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

Duplicate Filters (DateTime)

2 Answers 35 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jared
Top achievements
Rank 1
Jared asked on 19 May 2011, 04:10 PM
I have a GridViewDataColumn that is bound to a DateTime property. The value is being converted to a string representation that does not include seconds\milliseconds. When the dates are different by a number of seconds\milliseconds, we are noticing duplicate items in the column filter (see attached).

XAML
<grid:GridViewDataColumn
Header="Last Modified On"
DataMemberBinding="{Binding ModifiedDate, Converter={StaticResource DateTimeConverter}}" />

Note: A converter was used instead of DataFormatString because there is some additional logic to handle the output of DateTime.MinValue, etc.

Thanks for your help!

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 May 2011, 06:38 AM
Hi,

Since you've set this converter which will trim the unique part of the values I'm not sure what we can do to avoid this. Can you clarify?

Kind regards,
Vlad
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
Jared
Top achievements
Rank 1
answered on 20 May 2011, 04:09 PM
Hi Vlad,

I would like to bind to the converted value (string, not DateTime), rather than bind to the DataTime and display the converted value.

What is the best way to bind to a converted value?

Thanks!
Tags
GridView
Asked by
Jared
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jared
Top achievements
Rank 1
Share this question
or