I have a bit of a mystery on my hands. I have a radgrid that is getting data from a dataset (passed threw the business object from the data access object, comming from ORM), that works perfectly. The data shows up properly, and can sort and filter properly in the grid. I have a custom export to Excel function that exports filtered data. In this export process, I retrieve the information from the same method mentioned before, and apply the radgrid's filter to the data by accessing RadGridSomeGrid.MasterTableView.FilterExpression. The issue that I am having is that when I access the filter here, it shows that it is trying to filter it as a string. This doesn't work against the DateTime data coming in from the DataSet.
The filter as it comes from FilterExpression: "(([Accident Date] >= '1/1/10') AND ([Accident Date] <= '6/1/10'))"
The filter works if I manipulate it like so: "(([Accident Date] >= CAST('1/1/10' AS DateTime)) AND ([Accident Date] <= CAST('6/1/10' AS DateTime)))"
How can I accomplish this without tons of logic to seperate my individual filters, determine if it's supposed to be a date, locate the parameter, and wrap it?
Thanks,
Nathan
The filter as it comes from FilterExpression: "(([Accident Date] >= '1/1/10') AND ([Accident Date] <= '6/1/10'))"
The filter works if I manipulate it like so: "(([Accident Date] >= CAST('1/1/10' AS DateTime)) AND ([Accident Date] <= CAST('6/1/10' AS DateTime)))"
How can I accomplish this without tons of logic to seperate my individual filters, determine if it's supposed to be a date, locate the parameter, and wrap it?
Thanks,
Nathan