I have RadGrid which is populated via NeedDataSource Event.. In the grid, One of the column is DateTimeColumn.. Now, I want to add Date And Time Filter for this column.. So, I set the PickerType to DateTimePicker.. Now, It shows date control and time control.. But, when I select the time control it shows only hours and minutes.. whereas we need hour, minutes and seconds also should be shown.. Please let me know how to achieve this...
7 Answers, 1 is accepted
In order to achieve this scenario you can obtain a reference to the filter box of the column in the ItemCreated event, and set the DateFormat mask for the date input control:
The solution didn't work for me..
The column details which I used is below,
Please let me know,
1. How to the show the seconds in the time ticker
2. Filtering the records based on Date and Time
Thanks In Advance,
Тry using template column with DateTimePicker in it and add the following settings to the picker:
Seems there was misunderstanding I guess..
I have GridDateTimeColumn and values is DateTime value.. I'm able to display the value with Date and Time..
Now, My requirement is I need to add filter with both date and time option..
By default it shows the Date Picker.. If I change the Picker Type to DateTime, it shows both Date and Time picker.. But the problem, the time picker shows only hour and minute.. but I want hour, minute and seconds should be selected from the Time Picker.. so that it filters the value based on date and time..
To add more.. my input values 07/01/2015 04:44:32, 07/06/2015 06:33:55..
Now I want to filter the value with both Date and Time (hh:mm:ss)
Please guide with proper inputs as early as possible..
Thanks In Advance..
In this case the correct approach here is to set a FilterDateFormat string so that the time part (including the seconds) of the date does not get escaped. Attached is a sample example that demonstrates this approach.
It is not possible to add Seconds in the TimeView of the TimePicker control however you can manually modify the seconds in the filter filed.
I tried your solution but I didn't shows the seconds in the filter.. Please refer the image(Filter.jpg).. This is the result of the example..
but I want seconds also should be displayed in the timer.. Please refer the image (ExpectedFilterTimer.jpg).. This is what I want..
Please let me know how to do that..
Thanks In Advance..
Try setting TimeFormt for the filter item like this: