How to tell whether Esc is from an Insert or Edit in a KeyboardCommandProvider

5 posts, 1 answers
  1. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 27 Jan 2014 Link to this post

    How can I tell whether Esc is from an Insert or Edit in a KeyboardCommandProvider?
    Thanks in advance,
    Steve
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 30 Jan 2014 Link to this post

    Hi Steve,

    You could check the parentGrid.Items.IsEditingItem property. If it is True, then the Esc is from Edit, otherwise it is from Insert.

    Let me know how this works for you.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 30 Jan 2014 in reply to Dimitrina Link to this post

    That did the trick!
    Thanks,
    Steve
  5. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 30 Jan 2014 in reply to Dimitrina Link to this post

    I may be a little slow, but is there also a way to tell that I'm inserting?
    Thanks in advance,
    Steve
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 31 Jan 2014 Link to this post

    Hello,

    You can value of parentGrid.Items.IsAddingNew.

    I hope this helps.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WPF is Visual Studio 2017 Ready