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

DateTime column filter

2 Answers 139 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 20 May 2011, 04:31 PM
Hi,

I have a RadGridView with multiple columns, one column contain a timestamp (date + time) and I would like to know how in the column filter I can filter only on the date part (of course, I need to keep the time part in the column) ?

Thank's

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 May 2011, 12:25 PM
Hi Oliver,

The filtering of the column is applied on the actual underlying data object (that is of type DateTime in this case). The filtering window contains distinct values and therefore it is not possible to have the filtering only on the date part.

Imagine that you have two DateTime's with different times. For the .NET Framework these two are different because their times are different. Therefore they will be displayed as two different distinct values. If the time part was missing -- the user will simply see two identical dates, which does not make any sense.

Of course, if you are not satisfied with the built-in functionality, you can always create your own custom filtering control and implement any custom filtering logic.

I hope this helps.

Regards,
Didie
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
Oliver
Top achievements
Rank 1
answered on 25 Apr 2012, 04:44 PM
Just binding on the "DataMember.Date" should solve the problem ;)
Thank's
Tags
GridView
Asked by
Oliver
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Oliver
Top achievements
Rank 1
Share this question
or