Hi Paurnima,
Sorry for the delay in response.
If
you want to focus the child table row
using the tab key and also focus the particular cell of row index in a
grid, you can use the “TableControlKeyDown” event and
focus particular cell by using “MoveTo()”method and set the “GridSetCurrentCellOptions” as SetFocus.
Please refer the below code,
Code:
this.gridGroupingControl1.TableControlKeyDown
+= new GridTableControlKeyEventHandler(gridGroupingControl1_TableControlKeyDown);
void
gridGroupingControl1_TableControlKeyDown(object
sender, GridTableControlKeyEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTable tablechild = this.gridGroupingControl1.GetTable("Orders");
if (tablechild.CurrentRecord != null)
{
if (e.Inner.KeyCode == Keys.Tab)
{
e.TableControl.CurrentCell.MoveTo(GridRangeInfo.Cell(cc.RowIndex + 1, 1), GridSetCurrentCellOptions.SetFocus); // focus to next row in child table
}
}
MessageBox.Show("Table RowIndex : " +
tablechild.CurrentRecord.GetRowIndex());
e.Inner.Handled = true;
}
Please let us know if you have any
concern.
Regards,
Muthukumar K
Attachment:
Focus_particular_cell__Tab_key_e5a37b63.zip