Welcome to the Xceed Community | Help
Community Search  
More Search Options

Disable gird F2 key

Sort Posts: Previous Next
  •  02-08-2012, 10:49 AM Post no. 31653

    Disable gird F2 key

    Hello there,
    I have an issue in the WPF DataGrid, i would like to use the F2 shortcut with my own command NOT with the default editing mode, but I failed to the do it.
    I have made the following but didn't get it to work too:
                 grid.IsManipulationEnabled = false;
                grid.EditTriggers = EditTriggers.None;
                grid.CellEditorDisplayConditions = CellEditorDisplayConditions.None;
                grid.ReadOnly = true; 
     

    I used the F5 key related to the refresh command by setting the IsRefreshCommandEnabled to false, then my own command is being executed correctly.

    So, How should i accomplish the same with the F2 key ?
    I don't know how to disable the usage of F2 key by your edit command?

    regards, 
    Filed under: , ,
  •  02-08-2012, 7:02 PM Post no. 31658 in reply to 31653

    Re: Disable gird F2 key

    Hi Mohamed,

    This can be done by clearing the InputGestures of the BeginEdit command by accessing the static DataGridCommands, here's how: 

          DataGridCommands.BeginEdit.InputGestures.Clear();  

    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.