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

Filter On Date

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Daldry
Top achievements
Rank 1
John Daldry asked on 09 Feb 2010, 09:49 AM
Hi,

I have a a radgrid connected to an Oracle table.

The grid contains several columns, one of which is a date/time field.

All the columns have filters on them at the top, with the date/time field having a pop up calendar to select the date (built into telerik).

Now, when I select a date from the calendar, no records are selected.  This is because it looks at BOTH the date AND time portion of the data for exact matches (and as I have specified ONLY a date, the time defaults to 00:00:00), and finds no matches, even though I know there should be matches.

What is the point of this? I'm NEVER going to look for 25/12/09 23:59:59 am I? But I DO want to search for 25/12/09 on it's own, regardless of the time.

Yes, I know I can strip the date out in my code, and display the time in another column, but I should't have to - that's extra work, and I buy telerik to reduce my work, not create more!  Other grids allow you to search for just the date, so why can't Telerik?

I've asked before for Telerik to address this, in support tickets, but nothings been done, so PLEASE can we get date filtering working 'correctly', it really does cause me lots of issues with users unable to filter by date.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Feb 2010, 11:01 AM
Hi John,

Could you take a look at the forum link below where Telerik  has discussed this issue and provided a  temporary solution.

http://www.telerik.com/community/forums/aspnet-ajax/grid/date-filter-improvements.aspx

Thanks,
Shinu
0
John Daldry
Top achievements
Rank 1
answered on 09 Feb 2010, 01:54 PM
Hi Shinu,

Thanks for the link, I've had a look, and it appears (although I'm not 100% sure, as it's not using Oracle), that the solution requires that you change the date/time field into a date only field in the SQL command. Some of my tables have many fields, and I don't want to list each column name in sequence, I just want to do 'select * from emp'.

The users also need to see the date AND time together - that's what's inside the database, and that's what I want them to see.

It's particularly confusing for the users to see a pop up calendar to select a date from (to filter), and then it sticks '00:00:00' onto the end of whatever is selected - the user didn't do it, they only selected a date.

I'm sure other people must have the same requirement, I can't believe that no one else wants to simply search for a date in the column, and I'm unsure as to WHY Telerk don't seem to be interested in changing the functionality of searching dates in a grid.

By all means, leave the functionality to search for an exact match (including time) in place, but PLEASE give me an option to search ONLY for a date too.

John.
Tags
Grid
Asked by
John Daldry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
John Daldry
Top achievements
Rank 1
Share this question
or