Friday, August 20, 2010

Vb .net datagridview oledb?

how do i get a single row like in listbox i can use ';listbox1.selectedindex = 0'; how do i do it in datagrid.





if there is a programmer out there who would like to teach a complete idiot. please contact me.Vb .net datagridview oledb?
Here it is your code -assume you have named your DataGridView ';DataGrid';! (I haven't work with DataGridViews before but I've done a lot of other things - so I found it easily!):





'First, deselect every selected cell/row/column!


DataGrid.ClearSelection()


'Then select your row - replace 0 with the index of the row!


DataGrid.Rows(0).Selected = True

No comments:

Post a Comment