How can i get the cursor to be in the first cell of the row that is for adding a new record (the one with the + sign) after adding the record? I also want it to be already in edit mode, so I should be able to use StartEditMode command after whatever gets me to the correct cell? I have AddNewRecordLocation="OnBottomFixed" and AllowAddNew='"true". Thanks!
So far,
private void dp_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
XamDataPresenter dp = sender as XamDataPresenter;
if (dp != null)
}
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I suggest you use the following code in your XamDataGrid’s PreviewKeyDown event to achieve your goal:
if (e.Key == Key.Enter) { Dispatcher.BeginInvoke(new Action(() => { CellValuePresenter.FromCell(xamDataGrid1.RecordManager.CurrentAddRecord.Cells[0]).Editor.StartEditMode(); }), DispatcherPriority.Background, null); }
Feel free to write me if you have further questions.