[2005] datagridview select index 0 on click
on button click how do i set the selected index of the data grid to the first record? tnxxxx
also..
how do i set it so that when i click a specific row on a datagrid it would then be selected by the codes?
coz i have a grid and to delete records from it i need to click on a row
Re: [2005] datagridview select index 0 on click
Firstly, I would ask that you stop using the term "datagrid" if you're using a DataGridView. The DataGrid is a different control so you cannot use the two names interchangeably. If you do then it's only a matter of time until someone provides advice for a DataGrid that is irrelevant for a DataGridView.
As to your first question, if your grid is bound then you should be using a BindingSource. In that case you simply set the Position property of the BindingSource to 0. That makes the first item the Current item and will thus select it in any bound controls.
Your second question I don't understand at all. When you click on a row in the grid it is selected, so why would you need code to do it?