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
95
Tab Navigation
posted

Hi,

I was wondering if it's possible to disable tab navigation within a data grid and only allow arrow navigation.  I have an application that will not have a mouse and currently, a tab within the data grid moves to either the next cell or next record, depending on what is currently active, even if I set the KeyboardNavigation.TabNavigation to None.  

 Any help would be appreciated.

 Thanks,

Brett 

Parents
No Data
Reply
  • 4850
    Offline posted

    Hi Brett,

    One way to do this is to listen to the ExecutingCommand event and cancelling it, e.g.

    this.XamDataGrid1.ExecutingCommand += new EventHandler<ExecutingCommandEventArgs>(OnExecutingCommand);

    }

    void OnExecutingCommand(object sender, ExecutingCommandEventArgs e)

    {

    if (e.Command == DataPresenterCommands.CellNextByTab ||

    e.Command == DataPresenterCommands.CellPreviousByTab)

    e.Cancel = true;

    }

Children