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

RadGridView Filter Row Mode DateTime Filter

2 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nasir
Top achievements
Rank 1
Nasir asked on 24 Mar 2014, 11:38 AM
Hi,

We are using RadGridView Filter Row Mode for our column filters. In our Grids, we can have multiple days worth of data. The problem is, we allow formatting the date time. The value is provided by the user for the string format. The StringFormat of the DataMemberBinding is utilised here. So for example, if we have format hh:mm tt which would display time like 10:00 AM. What we want is, if the user chooses or types 10:00 AM, the grid should filter on all instances of 10:00 AM regardless of the Date part but currently it only  filters for the current day.

Is there a way to allow this behavior? I would really appreciate a prompt response to my query.

Regards,

Nasir.

2 Answers, 1 is accepted

Sort by
0
Nasir
Top achievements
Rank 1
answered on 25 Mar 2014, 09:50 AM
Can anyone please reply, this is very urgent. I can submit a support ticket if you need me to.
0
Dimitrina
Telerik team
answered on 26 Mar 2014, 04:49 PM
Hello,

No matter what the converted values are, the real filtering is always done on the underlying original data. The formatting is used for UI purposes only. This means that if you have "DateTime"-> converted to -> "Time"  then the GridView will be filtered on "DateTime" as it is the "DateTime" that is the raw data. 

In order to filter on the displayed values, you can create a property in your business object that holds the converted values ("Time"). Then you should set this property as a FilterMemberPath for that specific column. 
I would suggest you to also check our online documentation to understand how the filtering is actually performed. 

As another option you can try creating your own custom filtering control. You can check the article on applying your custom filtering logic.

Regards,
Didie
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
GridView
Asked by
Nasir
Top achievements
Rank 1
Answers by
Nasir
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or