locked
DataGrid: force enter to move to next, shift+enter to previous column in same row RRS feed

  • Question

  • How to force Enter key to move to next column in DataGrid like Tab key press and Shift+Enter to move to previous
    column like Shift+Tab press?

    Should I use something like

      protected override void OnKeyDown(KeyEventArgs e)
      {

       switch (e.Key)
       {
        case Key.Enter:


    ...  What to write here ?

         break;


    Andrus

    Sunday, July 26, 2009 6:38 AM

Answers

  • I haven't tried this out, but I think in that bit of code above, if you set dataGrid.CurrentColumn to the next column then that would work.

    Monday, July 27, 2009 2:13 PM