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

Close filter-dialog

2 Answers 184 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rieni De Rijke
Top achievements
Rank 1
Rieni De Rijke asked on 03 Aug 2010, 09:39 AM
We are using the filter-dialog in our gridviews. This works fine and fast.
What we are missing here is a Button / ShortCut to close the dialog.
When we now want to close the dialog we have to click (mouse) outside the dialog.
Is there a hidden feature maybe?

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 03 Aug 2010, 04:03 PM
Hello Rieni De Rijke,

 You may find this article useful: How To: Customize RadGridView's Default Filtering Control with Attached Behaviors (Silverlight & WPF)
All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Oliver Abraham
Top achievements
Rank 2
answered on 13 Oct 2011, 01:52 PM
Hi all,
I'd like to add a little code that closes the filter dialog on escape:

        public void PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == System.Windows.Input.Key.Escape)
            {
                CloseFilterDialogIfOpen();
            }
        }

        private void CloseFilterDialogIfOpen()
        {
            IList<Popup> FilterDialogs = radGridView1.ChildrenOfType<Popup>();
            if (FilterDialogs != null)
                foreach (Popup FilterDialog in FilterDialogs)
                {
                    if (FilterDialog.IsOpen)
                        FilterDialog.IsOpen = false;
                }
        }

Best regards
Oliver
Tags
GridView
Asked by
Rieni De Rijke
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Oliver Abraham
Top achievements
Rank 2
Share this question
or