Hey Nanda
this could help!!!!
You can override ProcessCmdKey, catch the Enter Key, and swap it for a
Tab key by sending a Tab, and not processing the Enter Key.
[C#]
public class MyDataGrid : DataGrid
{
protected override bool ProcessCmdKey(ref
System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
{
if(msg.WParam.ToInt32() == (int) Keys.Enter)
{
SendKeys.Send("{Tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
[VB.NET]
Public Class MyDataGrid
Inherits DataGrid
Protected Overrides Function ProcessCmdKey(ByRef msg As
System.Windows.Forms.Message, keyData As System.Windows.Forms.Keys) As
Boolean
If msg.WParam.ToInt32() = CInt(Keys.Enter) Then
SendKeys.Send("{Tab}")
Return True
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function 'ProcessCmdKey
End Class 'MyDataGrid
found on best Faq site!!!!
http://www.syncfusion.com/FAQ/WinForms/default.asp
Kind regards
SurfCoder
"Nanda" <cs******@hotmail.com> wrote in message
news:0b****************************@phx.gbl...
Hi all,
while editing a datagrid cell, if i press Enter key
focus goes to the next row, instead that i would like to
have focus on next cell, how can i obtain this.
Thanks & Regards,
Nanda