HOOKING UP EVENTS:
It is the most basic thing you need to learn to code in VS. In short it means that the event name, here DataGridView01_SelectionChanged
is connected to the event. To do so one can either use code or one inserts it into the correct slot of the events pane of the property tab. Select the DataGridView
, open the events pane (the one with the flash) and locate the SelectionChanged event! Here insert the name of the event and you are done.
(I only have the German versions of VS installed..)
The result is reflected in the form_designer.cs file and it is the same thing (in reverse) as double clicking that spot and then filling in the generated code stub..
Controls have many events; one is the default event and this can be generated by double clicking the control itself in the designer. But eventually you will need all 3 ways to generate and hook up the events, (as well as sometimes removing them.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…