I need to tab into a xamDataGrid, which would already have the active cell set on a combobox editor, and have that cell go into edit mode upon entry. I've discovered this is not as simple as calling StartEditMode on the CellValuePresenter in GotFocus, as that caused the event to be called multiple times when moving between grid rows, and I ended up breaking the event model. Has anyone been able to do this successfully without breaking all the standard navigation built into xamDataGrid?
Hello Darryl,
Thank you for your post!
I have been looking into your question. When a Cell of the XamDataGrid is activated the CellActivated event of the XamDataGrid is fired. Using this event you can force the cell, that is currently active to enter in edit mode.
Here is a code snippet, that you can use:
Dispatcher.BeginInvoke(new Action(() =>
{
CellValuePresenter.FromCell(e.Cell).Editor.StartEditMode();
}
), System.Windows.Threading.DispatcherPriority.Background, null);
I have also created a small sample application for you to show you this functionality. In the attached sample application you have to click on the first cell, in order to activate it. Then by pressing the Tab key you would navigate through the cells and they will enter in edit mode.
Please find the attachment and feel free to let me know if you have any further questions on this matter.
Thank you, but this is not what I asked. I need to tab into the grid and have the active cell go into edit mode. Do you know someone else who might be able to help?