What event fires when data grid highlight is moved?

emaduddeen

Well-known member
Joined
May 5, 2010
Messages
171
Location
Lowell, MA & Occasionally Indonesia
Programming Experience
Beginner
Hi Everyone,

Can you tell me what event is fired when the user moves the highlight bar in a data grid control?

Also this next question is related to the first question. I would like to detect when a user changes a value in one of the many text box controls on my form but don't want to write code in all of the text boxes to do this. Can you show me an easy way to detect any text changes in any of the text boxes? I intend to change a flag as a result of this action.

Thanks.

Truly,
Emad
 
Hi,

Than yes I can do the DataTable.

Is there a link on vbdotforums that shows how to set up the controls for binding to the DataTable?

I'm also interested in finding out how to get the data saved to the database when the user moves the highlight bar on the data grid only if there have been changes to any of the text boxes.

Truly,
Emad
 
Unless you have a specific reason for doing otherwise, you should:

1. Populate a DataTable by calling Fill on a DataAdapter or TableAdapter.
2. Bind the DataTable to a BindingSource.
3. Bind the BindingSource to the control(s).
4. Allow the user to edit the data as much as they want.
5. Save all the changes back to the database by calling Update on the same DataAdapter or a TableAdapter.
 
Back
Top