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

Remove filter from RadGridView

2 Answers 213 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dan R
Top achievements
Rank 1
Dan R asked on 22 Jun 2010, 04:56 PM
Hi, I am currently trying to programatically remove user applied filters from the radgridview. For example if the user does something that loads new data in the grid, we want to clear any filters they applied to the last data set. I found I can clear the filter to get a proper row number for new data by calling FilterDescriptors.Clear() but the column header visually does not update iself. The header for any previously filtered column still shows the funnel as half white half black instead of entirely black.
 
Once the user clicks on a column header, the filter graphic returns to all black but is there any way to do this programatically? This is the code I am currently using which properly clears the filter:

grid.FilterDescriptors.Clear();


I also tried to reference the columns individually as ColumnFilterDescriptors but this did not work either:

 

 

while (grid.FilterDescriptors.Count > 0)

 

{

 

    ColumnFilterDescriptor desc = (ColumnFilterDescriptor)grid.FilterDescriptors[0];

 

    desc.FilterDescriptors.Clear();
    grid.FilterDescriptors.Remove(desc);
}


Any help is refreshing the column headers would be appreciated. Thanks.

2 Answers, 1 is accepted

Sort by
0
Dan R
Top achievements
Rank 1
answered on 24 Jun 2010, 09:58 PM
No one has any ideas? All I want to do is visually fix the column headers so that there is no evidence that a filter ever existed when programatically removing them. Can I programatically set a style on some child object in the column header?
0
Rossen Hristov
Telerik team
answered on 25 Jun 2010, 08:57 AM
Hello Dan R,

We believe that you have hit a bug that was already fixed. Could you please upgrade to our Latest Internal Build version or the BETA version and try this again. Let us know if the issue still exists.

Greetings,
Ross
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
Tags
GridView
Asked by
Dan R
Top achievements
Rank 1
Answers by
Dan R
Top achievements
Rank 1
Rossen Hristov
Telerik team
Share this question
or