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

Preserving dates in date range

2 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Justus
Top achievements
Rank 1
Justus asked on 08 Jan 2014, 10:56 PM
Right now we are storing filtering in the session so that whenever a user returns to the grid, their filter options are still preserved. Everything is working great, except for the values that were in the date range. For all the other columns, I was able to specify column.CurrentFilterValue = "something" and then the respective filter text box would reflect "something." However, when I try this same technique for my date range column, it does nothing, and the "From" and "To" textboxes are just blank, but the grid's filtering is still preserved.

How can I reset these values on date range columns?

Thank you for your help

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 09 Jan 2014, 04:02 AM
Hi Justus,

I guess you want to have the CurrentFilterValue set for the DateColumn. You could set both dates separated by a white-space character like shown below:

C#:
GridColumn column = RadGrid1.MasterTableView.GetColumnSafe("DateColumnName");
column.CurrentFilterValue = "05/04/13 09/01/14";

Thanks,
Princy

0
Justus
Top achievements
Rank 1
answered on 09 Jan 2014, 03:46 PM
That worked, thank you! I swore I had tried that too...
Tags
Grid
Asked by
Justus
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Justus
Top achievements
Rank 1
Share this question
or