AddNew and navigation

In the TableControlCurrentCellEditingComplete event, I call EndEdit() on the record being edited.

This has the effect of adding a new row, but the navigation tabs to a cell on the new row.

How can I force the current row of the table back to the row that was being edited so that the focus will remain on that row?

Many thanks
Martin


1 Reply

HA haneefm Syncfusion Team January 8, 2008 11:35 PM UTC

Hi Martin,

Y can use the SetCurrent method to set the focus to the particular record's column in grid. Here is a code snippet that give the focus to the first column of the add new row in a grid by using AddNewRecord.SetCurrent method. Below is a code snippet

//For AddNewRecord..
this.grid.TableControl.Table.AddNewRecord.SetCurrent("parentID");

//For CurrentRecord.
//this.grid.TableControl.Table.CurrentRecord.SetCurrent("parentID");

//For fisrt record.
//e.TableControl.Table.Records[0].SetCurrent("parentID");


Best regards,
Haneef


Loader.
Up arrow icon