Datagrid New Record Position

  • Thread starter Thread starter MP
  • Start date Start date
M

MP

Hello

I want to know how programmatically put the focus on the new record row of a
datagrid

(the one with the "*" at the bottom of the grid)

TIA

MP
 
The only thing that I can think of is this:
this.dataGrid1.Select(this.dataGrid1.VisibleRowCount);

Or if you are binding to a DataTable then this:

this.dataGrid1.Select(oTable.Rows.Count);
 
Thanks, I got the idea with the Select method
this way it works exactly as I want;


dataGrid1.Select(dataSet1.Tables[0].Rows.Count);
dataGrid1.CurrentRowIndex = dataSet1.Tables[0].Rows.Count;
dataGrid1.Focus();

MP
 
Back
Top