This question is locked. New answers and comments are not allowed.
I created a custom filter. I know that when you click outside of the filter control, it will close the filter. I want to add a button that will close the filter control, but I didn't find anything.
4 Answers, 1 is accepted
0
Edward
Top achievements
Rank 1
answered on 05 Jan 2012, 07:58 PM
I did this:
For some reason ParentOfType<System.Windows.Controls.Primitives.Popup>() always return null.
private void Image_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
try
{
((this.Parent as Control).Parent as System.Windows.Controls.Primitives.Popup).IsOpen = false;
}
catch (Exception)
{
}
}
For some reason ParentOfType<System.Windows.Controls.Primitives.Popup>() always return null.
0
Hi Edward,
Maya
the Telerik team
I would recommend you to run through this blog post for a reference. Does the solution there correspond to your requirements ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Chirag
Top achievements
Rank 1
answered on 22 Mar 2012, 12:20 PM
Hi Edward
Have you solve a close button issue in custom filter control
Please provide some idea for that
i am also face same kind of problem and post in telerik site but still not gating any solution if you have please reply in your question or my question.
My question link = http://www.telerik.com/community/forums/silverlight/gridview/close-custom-filter-control.aspx
Have you solve a close button issue in custom filter control
Please provide some idea for that
i am also face same kind of problem and post in telerik site but still not gating any solution if you have please reply in your question or my question.
My question link = http://www.telerik.com/community/forums/silverlight/gridview/close-custom-filter-control.aspx
0
Chirag
Top achievements
Rank 1
answered on 10 May 2012, 01:53 PM
hello
i think this code can help you
i think this code can help you
private
void
btnclose_Click(
object
sender, RoutedEventArgs e)
{
FilteringDropDown down = Telerik.Windows.Controls.UIElementExtensions.ParentOfType<FilteringDropDown>(
this
);
if
(down !=
null
)
{
down.IsDropDownOpen =
false
;
}
}