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

Problem filtering a complex column

0 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 27 Mar 2012, 05:29 AM
Each row of my RadGridView is a CallFactorSet, and a call factor set has four boolean properties on it.
One column of my RadGridView is "Applied To" and it uses these four boolean properties to build a string that is shown in the column.

<telerik:GridViewDataColumn
    Header="Applied To"
    DataMemberBinding="{Binding Path=_CallFactorSet, Converter={StaticResource callFactorSetAppliedToPlansConverter}}"
    IsReadOnly="True" />

In order to make this column filterable, I've added IComparable<CallFactorSet> to the implementation of CallFactorSet. This uses the String.CompareTo() method to compare the strings that are generated by each call factor set.

Having implemented that interface, the column is now filterable in the UI. However, the options for the filtering haven't been "grouped".
Picture explaining what I mean: pic

If I check a single string in that list, it works as expected and does show me all rows in the grid that match that string. Then, if I close and reopen the filter dialog I can see all entries of that string checked.

How can I fix it so each string only appears in the filter list once.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Share this question
or