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

[Solved] RadGrid Date Filter Issue

1 Answer 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pinkey
Top achievements
Rank 1
Pinkey asked on 05 Aug 2009, 07:39 AM
Hello,
        I am using RadControls for ASPNET AJAX Q1 2009. 
I am having a RadGrid with filters on different fields. For all filters I am using RadComboBox.
I have referes to the method given for FilterTemplates example for using RadComboBox as filters.
One of the RadGrid column is displaying the Date of record.
But I have to filter this date according to Year only. 
For Ex: If I have 10 dates of year 2005 and 3 dates of 2006. Then the filter combo for date should contain items as 2005 and 2006.
         Hence whenever I select 2005 from filter it should display all dates from year 2005 along with other filters if applicable.

But now I am unable to show the year in RadComboBox filter. Also I am not able to filter on Year.

Please help me regarding this if anyone finds any solution. This is very urgent.

Thanks,
Pinkey

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Aug 2009, 07:07 AM
Hello Pinkey,

One possible option in this case, would be to include a separate column, which contains only the year for the date. When the filtering is triggered, you can filter on this column. This can return all the values, which are related to a given year.
Alternatively, you can simply alter the select statement of the underlying datasource, to return all the records, which contain a specific year in their Date column.
I hope one of the two options is suitable for you.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Pinkey
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or