Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Using arrow keys during edit
posted

Hello,

In the XamDataGrid I am trying to do something like this:

private void dataGrid_KeyDown(object sender, KeyEventArgs e)
{
     if (e.Key == Key.Up)
     {
          dataGrid.ExecuteCommand(DataPresenterCommands.EndEditModeAndAcceptChanges);
          dataGrid.ExecuteCommand(DataPresenterCommands.CellAbove);
          dataGrid.ExecuteCommand(DataPresenterCommands.StartEditMode);
          e.Handled = true;
     }
}

The problem I am having is that when I am in Edit mode of the cell, this event does not seem to be fired (I checked by adding a Console.WriteLine() as the first line. This strategy worked well for me using the UltraWinGrid in Winforms. Is it just not intended to work that way in the WPF version?

Thanks in advance!