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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top