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

Default FilterControl and key events

3 Answers 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mariusz
Top achievements
Rank 1
Mariusz asked on 13 Jul 2012, 09:55 AM
Hello,
On my window I have RadGridView, and defained default key events:
Escape : close window
Enter    : try commit data and close window
The problem is, when somebody open filter control, try enter value to it and press Enter key to apply filter.
It cause commit and close event on my window. How to handle key events on filter control, and disable routing to my window, when filter control is open??
 

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 16 Jul 2012, 10:42 AM
Hi,

What you can try is to derive from our class FilteringControl. Then in the derived class override the OnKeyDown event and mark it as handled when you want to. Then assign an instance of your derived FilteringControl class to the FilteringControl property of the respective column, i.e. all columns in your case.

Maybe this will help.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mariusz
Top achievements
Rank 1
answered on 19 Jul 2012, 08:18 AM
Hi,
Thanks, It works, but how can I close FilterControl on key events.
Enter - apply filter and close
Escape - don't apply filter and close
0
Rossen Hristov
Telerik team
answered on 20 Jul 2012, 07:31 AM
Hello,

You could use an approach similar to the one described in this blog post.

All the best,
Ross
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Mariusz
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Mariusz
Top achievements
Rank 1
Share this question
or