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

RadDateTimeEditor value current time

2 Answers 103 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Marseille
Top achievements
Rank 1
Marseille asked on 05 Feb 2021, 11:34 AM

When user manually types the filter value (only date) in RadDateTimeEditor adds current time, so the filter value becomes -  %data %current time.

And filtering gives the empty table, because of values in datetime columns have 00:00:00 time.

How to set time to 00:00:00 instead of using current?

 

P.S. If user chooses value with DateTimePicker then filter value is %data 00:00:00 and filtering works fine.

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Feb 2021, 07:42 AM
   

Hello, Marseille,  

I would like to note that GridViewDateTimeColumn which is usually used for managing DateTime values in RadGridView, offers the FilteringMode property. Thus, you can change the way the dates in the column are filtered. The available options in the GridViewTimeFilteringMode enumeration are:
- Time - filter by time only
- Date - filter by date only
- DateTime = Time | Date - filtering by both date and time

I believe that setting the FilteringMode property to GridViewTimeFilteringMode.Date would fit your scenario.

Additional information about the settings that GridViewDateTimeColumn offers is available here: https://docs.telerik.com/devtools/winforms/controls/gridview/columns/column-types/gridviewdatetimecolumn

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Marseille
Top achievements
Rank 1
answered on 09 Feb 2021, 01:41 PM
That's perfect thanks!
Tags
DataFilter
Asked by
Marseille
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Marseille
Top achievements
Rank 1
Share this question
or