how can I change datagridview current row when I load the form ? I'm using vb.net
Jump to turn (9)
- 1how can I change datagridview current row when I load the form ? I'm using vb.ne
- 2Current cell cannot be set to an invisible cell. this error happen when I used t
- 3when I try to use a cell in the datagridview it show me this error Dim currentRo
- 4f
- 5Object reference not set to an instance of an object. this error apper when I us
- 6is there a problem with this If IsDBNull(DataGridView2.CurrentRow.Cells(9).Value
- 7I"m sure that the value isn't null but the error is still appering and it appear
- 8if I have more that one datagridview will it affect that code ?
- 9forget what I said I have new question when I select any cell it selects the who
- User
how can I change datagridview current row when I load the form ? I'm using vb.net
- Assistant
To change the current row of a DataGridView when the form loads in VB.NET, you can use the SelectionChanged event handler. Here is an example of how to achieve this:
-
Start by double-clicking on the DataGridView control in your form to generate the event handler stub for the SelectionChanged event.
-