Movement within a datagridview
hi
i have a datagridview which contains data from the database
say the datagridview has the following rows:
Abc 123
Abc 231
Ccc 313
cdc 321
ddd ceq etc.
now when the user presses c he should be taken to the 3rd row.
when he cd he should be taken to the 4th row.
i do not want to use the textbox as the datagridview contains more than 400 records and it has about 5 cols. which need to be filled up before saving and hence i cant re - populate the datagridview from the database.
i hope i have make myself clear and could explain what the need is. :)
thanks in advance.
Re: Movement within a datagridview
You really should have the user type the search text into a TextBox. The number of records is irrelevant to that. You should query the database to populate a DataTable, bind that to a BindingSource and bind that to the grid. You can then handle the TextChanged event of the TextBox and do this:
vb.net Code:
myBindingSource.Position = myBindingSource.Find("Column Name Here", myTextBox.Text)