AD
Administrator
Syncfusion Team
November 28, 2006 10:10 AM UTC
Hi Borja,
You can handle the CurrentCellKeyDown event and get the EnterKey ColIndex of the grid. Then check the LastKeyDown ColIndex to CurrentCell.ColIndex in CurrentCellKeyPress event. Here is a code snippet to show this.
int iLastKeyDownColIndex = -1;
private void gridDataBoundGrid1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{ iLastKeyDownColIndex = this.gridDataBoundGrid1.CurrentCell.ColIndex;}
private void gridDataBoundGrid1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
if( (int)e.KeyChar == 13)
{
if( this.gridDataBoundGrid1.CurrentCell.ColIndex != +iLastKeyDownColIndex)
MessageBox.Show("EnterKey pressed in previous CurrentCell");
}
}
Best Regards,
Haneef