hello,
i created myowndatagrid overriding the method processCmdKey the goal is to
set an given value
to an cell if the user hits ctrl-enter and move the cursor to the next cell.
the problem is that after setting the value and sending the tab-key doesn't
move the cursor to the next
cell. the cursor is set to the next control on the form.
any tips?
my code:
const int WM_KEYDOWN = 0x100;
const int WM_SYSKEYDOWN = 0x104;
if((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN))
{
switch(keyData)
{
case Keys.Control | Keys.Enter:
DataTable table = this.DataSource as DataTable;
table.Rows[this.CurrentRowIndex]["myColoumnName"] = "myValue";
SendKeys.Send("{Tab}");
return true;
}
}
thanks, best regards jochen