Hi,
I am using a grid with last column as editable.
My requirement is if user tabs out of the first row last column the focus should go automatically to
2nd row last column and the column should be in ediatble mode.
Can anybody help me to acheive the same?
Hello ,
You can use the XamDataGrid’s PreviewKeyDown event and use its ExecuteCommand Method to manipulate the grid yourself. Here is a sample code snippet where 4 is the index of the last column:
private void xamDataGrid1_PreviewKeyDown(object sender, KeyEventArgs e)
{
if ((e.Key == Key.Tab) && (xamDataGrid1.ActiveCell.Field.Index == 4))
xamDataGrid1.ExecuteCommand(DataPresenterCommands.CellBelow);
xamDataGrid1.ExecuteCommand(DataPresenterCommands.StartEditMode);
e.Handled = true;
}
Hope this helps.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Thanks a lot Petar.
This works as I expected :)
Hi Arthi,
Really glad I could help. Would you please just verify this answer so it is more accessible for other customers have similar question.
Thanks in advance Petar.
Hi Petar,
Sorry for the delay. I have done it.
Thanks & Regard,
M. Arthi