Focus on new inserted row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have DataTable and I perform Rows->AddRow on it. New record is created
and it is visible in datagridview. But how to make new record as focused one
after below operation.
DataRow^ dataRow;
dataRow = MyTable->NewRow();
dataRow[1] = "shit happens";
MyTable->Rows->Add(dataRow);
????MyDataGridView->FocusedRow = dataRow ;

Thanks,
Peter
 
I believe the Property is Selected that you want - just pass in Rows.Count
setting selected to it and it should work
 
Back
Top