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

Grid Sorting on a Date Format String

2 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dheeraj
Top achievements
Rank 1
Dheeraj asked on 28 Aug 2012, 09:32 PM
I have a Telerik Grid that has a "Effective Date" column, the value that is bound to this column comes as String.
I format the value as below:

columns.Bound(m => m.EffectiveDate).Width(120).Title(

"Effective Date").Format("{0:MM/dd/yyyy}");

But Sorting does not work on this column, how to get the Sorting fixed?

 

2 Answers, 1 is accepted

Sort by
0
Dheeraj
Top achievements
Rank 1
answered on 29 Aug 2012, 03:39 PM
Any Gurus out there?
0
Pedro
Top achievements
Rank 2
answered on 04 Sep 2012, 07:11 PM
try using

columns.Bound(m => m.EffectiveDate).Width(120).Title("Effective Date").Format("{0:d}");

if not, try sorting server side.
Tags
Grid
Asked by
Dheeraj
Top achievements
Rank 1
Answers by
Dheeraj
Top achievements
Rank 1
Pedro
Top achievements
Rank 2
Share this question
or