How to find out what the edit trigger is?

2 posts, 0 answers
  1. Steve
    Steve avatar
    77 posts
    Member since:
    May 2014

    Posted 01 Mar 2018 Link to this post

    I want to have a slightly different edit behavior depending on what the edit trigger is, e.g. F2/click vs just typing. Is there anyway to determine this information with the objects and events available?
  2. Vladimir Stoyanov
    Vladimir Stoyanov avatar
    355 posts

    Posted 06 Mar 2018 Link to this post

    Hello Steve,

    There isn't an out of the box way to know how a RadGridView cell has entered into edit mode. What I can suggest is to register event handlers for the PreviewMouseDoubleClick and KeyDown events and keep a variable indicating which one has been called last. Since those events are called before the BeginningEdit event of the RadGridView, you can implement the logic that you desire based on that variable. In the KeyDown event, you can check the Key property of the KeyEventArgs in order to distinguish when the F2 key was hit. 

    I remain at your disposal for any further questions you may have.

    Vladimir Stoyanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top