right arrow key down on last column of row

Hi,
I have a GGC which has its showrowheader = false. When the cursor/focus is on the last cell of a row, and when I press the right arrow keystroke, the focus comes to the first cell in that row.. How can I suppress this?

when the row header is visible, this doesnt happen..

Thanks
Sam

1 Reply

AD Administrator Syncfusion Team March 16, 2007 07:56 PM UTC

Hi Sam,

You can try this code snippet in a TableControlCurrentCellKeyDown event of the grid and let me know if this helps.

void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
int VisibleColCount = e.TableControl.TableDescriptor.VisibleColumns.Count ;
int LastColIndex = e.TableControl.TableDescriptor.FieldToColIndex(VisibleColCount - 1);
if (e.Inner.KeyData == Keys.Right && e.TableControl.CurrentCell.ColIndex == LastColIndex)
{
e.Inner.Handled = true;
}
}

Best regards,
Haneef

Loader.
Up arrow icon