How to change CurrentRow.Index in dataGridView?

  • Thread starter Thread starter Mladen Belaj
  • Start date Start date
M

Mladen Belaj

After Fill method, CurrentRow.Index is 0, but I need that some other Row is
CurrentRow. How?

Thanks
 
Mladen Belaj said:
After Fill method, CurrentRow.Index is 0, but I need that some other Row
is CurrentRow. How?

Look at the the Position property of the CurrencyManager class

' EXAMPLE FROM MSDN
' Place the next line into the Declarations section of the form.
Private myCurrencyManager As CurrencyManager

Private Sub BindControl(myTable As DataTable)
' Bind a TextBox control to a DataTable column in a DataSet.
TextBox1.DataBindings.Add("Text", myTable, "CompanyName")
' Specify the CurrencyManager for the DataTable.
myCurrencyManager = CType(me.BindingContext(myTable), CurrencyManager)
' Set the initial Position of the control.
myCurrencyManager.Position = 0
End Sub
 
Back
Top