LS
Lingaraj S
Syncfusion Team
August 26, 2009 11:45 AM UTC
Hi Erlan,
Thank you for your interest in Syncfusion products.
Please try using CurrentCellKeyDown event in GridControl to achieve this functionality.
Refer the code below:
######### C# Code
this.gridControl1.CurrentCellKeyDown += new KeyEventHandler(gridControl1_CurrentCellKeyDown);
void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
{
if (this.gridControl1.CurrentCell.Renderer.StyleInfo.CellType == "TextBox")
{
if (e.KeyCode == Keys.Enter)
{ // Catch the Enter key
// perform the function
}
}
}
######### VB Code
AddHandler gridControl1.CurrentCellKeyDown, AddressOf gridControl1_CurrentCellKeyDown
Private Sub gridControl1_CurrentCellKeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
If Me.gridControl1.CurrentCell.Renderer.StyleInfo.CellType Is "TextBox" Then
If e.KeyCode = Keys.Enter Then
' perform the function
End If
End If
End Sub
Please let me know if you have any queries.
Regards,
Lingaraj S.
EB
Erlan Bekenov
August 28, 2009 04:32 AM UTC
Hello.
Yeah, it works, thanx a lot!