This is a migrated thread and some comments may be shown as answers.

How to find out what the edit trigger is?

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 02 Mar 2018, 05:30 AM
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?

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 06 Mar 2018, 01:08 PM
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.

Regards,
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.
Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or