Hi Team,
When the User clicks on a cell in the Xam data grid, the cell should be selected but not go into edit mode, Only if the user clicks (F2) then the cell should
be editable, after editing when user clicks on Enter, cell should no more be editable.
I used below events but are not working as expected.
private void dgDeviceList_CellActivated(object sender, Infragistics.Windows.DataPresenter.Events.CellActivatedEventArgs e) {Dispatcher.BeginInvoke(new Action(() =>{ CellValuePresenter.FromCell(e.Cell).Editor.EndEditMode(True,True);}), System.Windows.Threading.DispatcherPriority.Background, null);
}
private void xamDataGrid1_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter || e.Key == Key.Left || e.Key == Key.Up || e.Key == Key.Down) dgDeviceList.ExecuteCommand(DataPresenterCommands.EndEditModeAndAcceptChanges);
if (e.Key == Key.F2) { dgDeviceList.ExecuteCommand(DataPresenterCommands.StartEditMode);
How could i achieve this.
HI,
Please let me know if you need further assistance regarding this case.
Sincerely, Matt Developer Support Engineer
F2 is already a standard key action mapping in the DataPresenter that toggles the edit mode. You don't need to Execute the StartEditMode command.
Sincerely,
Matt Developer Support Engineer
I am reviewing this issue.