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

GridViewDateColumn: Unique values in Filter

2 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gautam
Top achievements
Rank 1
Gautam asked on 09 Feb 2012, 05:12 PM
Currently I have 

 <telerik:GridViewDataColumn Header="{x:Static resources:Strings.XXXXXXXXXXXX}"
                                                IsFilterable="True"
                                                IsSortable="True"
                                                DataMemberBinding="{Binding Path=XXXXXXXXXXXXXXXX}"
                                                CellTemplate="{StaticResource XXXXXXXXXXXXX}" />

But I observe repeat values in the filter since the column contains repeat values.  How can I avoid this and make sure the filter contains only the unique values?  I am using MVVM.

Thanks

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 09 Feb 2012, 05:19 PM
Hi,

The behavior that you describe is not normal. The distinct values should be distinct, i.e. they should not repeat.

Unfortunately, we can't reproduce this behavior on our demos no matter what we try. All of our demos have distinct values that work correctly.

Please, send us a sample project that reproduces this behavior and we will examine it to see what is going on.

Kind regards,
Ross
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Gautam
Top achievements
Rank 1
answered on 09 Feb 2012, 06:00 PM
I realized what was going on.  I was using  DataMemberBinding="{Binding Path=XXXXXXXXX, StringFormat={}{0:MM/yyyy}}" /> to display the data.

Because of this string format, it gives the impression that the values are duplicate.  

Ex: 02/01/2010
      02/05/2010
      02/26/2010

are all being displayed as 02/2010 in the filter. 
Tags
GridView
Asked by
Gautam
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Gautam
Top achievements
Rank 1
Share this question
or