Capturing row selection in a datagridview

smbrush

Member
Joined
Dec 16, 2013
Messages
5
Location
Philadelphia, PA
Programming Experience
10+
I'm trying to capture user's choice of a row in a datagridview control on a form in VB.Net 2008. My first question is what event should I handle in code? Events such as SelectionChanged and RowEnter occur as the form loads and for each row populating the grid. Is there an event that occurs only when the user clicks on the control or moves to another row with the arrow key?

How should I read user selection of a row in the grid? I'm populating the grid with a subset of columns from a datatable created with code. I want to populate text boxes with data from the other columns from the datatable not appearing in the datagridview. How can this best be done?
 
How do I test to see if the grid is being initialized?
Did you read my post that you quoted or just quote it? I said use a Boolean flag. You initialise it to one value and toggle it when you're done initialising. It's not magic. It's your grid and your code so you know when you're done initialising it.
 
Back
Top