Hi there,
I created a custom filter control as user control in my WPF application. I have a button in my MainWindows.xaml which clear all filters programatically for GridView. Everything works fine. when i click on button, it clear all filters and load grid data again, but it didn't clear filter's appearance in GridView. can you please suggest me how should i change appearance of filters in GridView when click on button?
I created a custom filter control as user control in my WPF application. I have a button in my MainWindows.xaml which clear all filters programatically for GridView. Everything works fine. when i click on button, it clear all filters and load grid data again, but it didn't clear filter's appearance in GridView. can you please suggest me how should i change appearance of filters in GridView when click on button?
4 Answers, 1 is accepted
0
Hi kalpesh,
Didie
the Telerik team
Unfortunately the information that you have provided is not enough to reproduce your scenario. Would you please share with us how you are doing your custom filtering?
Are you using RadGridView.FilterDescriptors.Clear(); when you are programatically clearing the filters?
Didie
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

kalpesh
Top achievements
Rank 1
answered on 26 May 2011, 01:11 AM
Hi There,
Thanks for your quick Response. I explain in more depth.
In my WPF Applicaiton, I have MainPage.xml which contains RadGridView and Clear All Filters button (outside of GridView).
I also have customFilterControl as staffMemberFilterControl.xml, which contrains dropdownlist control to display list of Staff members. it also has filter and clear button.
When i click on filter icon of GridView, it will open my CustomFilterControl (staffMemberFilterControl.xml), so i can select staff from dropdown and filter gridview based on selection. It works fine.
When i click on filter button in my CustomFilterControl (staffMemberFilterControl.xml), it will change apperance of filter icon in GridView. now i click on Clear All filter which is available outside of Gridview, it clear all filters for GridView, but it doesn't change apperance of filter icon in GridView. I used RadGridView.FilterDescriptors.Clear(); method to clear all filters.
can you please also suggest me how to attach my project, so it will help to understand my problem.
Thanks for your quick Response. I explain in more depth.
In my WPF Applicaiton, I have MainPage.xml which contains RadGridView and Clear All Filters button (outside of GridView).
I also have customFilterControl as staffMemberFilterControl.xml, which contrains dropdownlist control to display list of Staff members. it also has filter and clear button.
When i click on filter icon of GridView, it will open my CustomFilterControl (staffMemberFilterControl.xml), so i can select staff from dropdown and filter gridview based on selection. It works fine.
When i click on filter button in my CustomFilterControl (staffMemberFilterControl.xml), it will change apperance of filter icon in GridView. now i click on Clear All filter which is available outside of Gridview, it clear all filters for GridView, but it doesn't change apperance of filter icon in GridView. I used RadGridView.FilterDescriptors.Clear(); method to clear all filters.
can you please also suggest me how to attach my project, so it will help to understand my problem.
0
Accepted
Hello kalpesh,
This behavior was changed, so that now the FilterDescriptors.Clear() is going to set IsActive back to False automatically.
The improvement will be available with the next internal build.
I am attaching a sample project that is showing how this is working.
Best wishes,
Didie
the Telerik team
This problem occurs because the public IsActive property of the CustomFilteringControl is not set back to false by the FilterDescriptors.Clear() method.
You need to manually set this property of the FilteringControl to false. In order to do this you could add this code after you clear the filter descriptors:
private
FromDateToDateFilterControl customFilter = ((FromDateToDateFilterControl)((GridViewDataColumn)
this
.clubsGrid.Columns[
"Established"
]).FilteringControl);
private
void
ButtonClearFilter_Click(
object
sender, RoutedEventArgs e)
{
clubsGrid.FilterDescriptors.Clear();
customFilter.IsActive =
false
;
}
This behavior was changed, so that now the FilterDescriptors.Clear() is going to set IsActive back to False automatically.
The improvement will be available with the next internal build.
I am attaching a sample project that is showing how this is working.
Best wishes,
Didie
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

kalpesh
Top achievements
Rank 1
answered on 26 May 2011, 10:19 PM
Hi there,
Thanks for your quick response.
It's a great answer. I solved my problem based on your advise.
Thanks
Thanks for your quick response.
It's a great answer. I solved my problem based on your advise.
Thanks