I want to bind a grid to a linqdatasource. The date in the db as stored as an integer like so 20070205 (YearMonthDay).
When I try toconvert the int to a date in the linq query like so
var q = from i in ICILOCs
select i.LASTRCPTDT.ToString("MM/dd/yyyy");
I get an error:
Method 'System.String ToString(System.String)' has no supported translation to SQL.
I can load the results into memory with ToList() and then parse it. The problem is I will loose the efficient paging with the grid.
Or I can parse it on ItemDatabound, the problem is that how will I set the filter for this field in the grid? It should a calendar dropdown, not an integer textbox.
Do you have any solution for this?
When I try toconvert the int to a date in the linq query like so
var q = from i in ICILOCs
select i.LASTRCPTDT.ToString("MM/dd/yyyy");
I get an error:
Method 'System.String ToString(System.String)' has no supported translation to SQL.
I can load the results into memory with ToList() and then parse it. The problem is I will loose the efficient paging with the grid.
Or I can parse it on ItemDatabound, the problem is that how will I set the filter for this field in the grid? It should a calendar dropdown, not an integer textbox.
Do you have any solution for this?