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

[Solved] Adding DelegateFilterDescriptor to FiltersDescriptors collection doesn't update column

1 Answer 63 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Patrick
Top achievements
Rank 1
Patrick asked on 23 May 2014, 01:08 PM

In order to improve its use, I save user's sorts, groups and filters in the event "OnNavigatedFrom" of the page containing the grid.

In the event "OnNavigatedTo" I retrieve the saved descriptors and add them to the collections GroupDescriptors , SortDescriptors , FilterDescriptors to display the grid in its previous state.

This works well for standard descriptors ( PropertyGroupDescriptor , PropertySortDescriptor , PropertyFilterDescriptor ) , the grid is displayed correctly and graphics UI(column and group headers) are updated.

But when I add a custom descriptor ( DelegateFilterDescriptor ) which corresponds to a list of checkboxes in the filtering UI, the rows filter is ok ​​but the column header is not updated (the rectangle in the bottom of the header is not displayed to show that there is an active filter on the column) and there is not descriptor associated to the column. 

What do you think of this behavior ?

Regards

Patrick

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 28 May 2014, 11:33 AM
Hi,

I confirm the current version of RadDataGrid does not show the rectangle in the column header when a delegate filter descriptor has been applied. As a workaround I can suggest that you add a dummy PropertyFilterDescriptor when you add DelegateFilterDescriptor/s (this will cause the RadDataGrid to show the rectangle) and respectively remove it when you remove the DelegateFilterDescriptor/s.
For example you can create a class that derives from the TextFilterDescriptor and override it's PassesFilterOverride method to always return true(thus all items will pass the filter):
public class PropertyDescriptor : TextFilterDescriptor
 {
     protected override bool PassesFilterOverride(object itemValue)
     {
         return true;
     }
 }

<local:PropertyDescriptor  PropertyName="PropertyName"/>

Let me know if this works for you.

Regards,
Ivaylo Gergov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid for XAML
Asked by
Patrick
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or