Current I am working on adding new rows to datagrid. After I add a row I hit Enter and want to set focus on the first column of next empty row. how can i get that? thanks.
Printable View
Current I am working on adding new rows to datagrid. After I add a row I hit Enter and want to set focus on the first column of next empty row. how can i get that? thanks.
i found this in the internet
make a customize datagrid
and do like this
VB Code:
Public Class MyDataGrid Inherits DataGrid Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal 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 End Class
hope this helps
Thanks, that is what I want.:wave: