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

GridDateTimeColumn sorting issue

2 Answers 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Parth
Top achievements
Rank 1
Parth asked on 03 Sep 2010, 02:07 PM
Hello,

I have the GridDateTimeColumn in my grid. When I try to sort the values it sort correctly for 2 consecutive times and when I try the third consecutive time it fails to sort.

Any help will be appreciated.
<telerik:GridDateTimeColumn DataField="lastmodified" HeaderText="lastmodified" SortExpression="lastmodified" PickerType="DatePicker" UniqueName="lastmodified" ReadOnly="true" DataType="System.DateTime" DataFormatString="{0:d}"/>
 From the database I have the values in the smalldatetime format

Thanks,
Parth

2 Answers, 1 is accepted

Sort by
0
Accepted
Cori
Top achievements
Rank 2
answered on 03 Sep 2010, 02:35 PM
Hello Parth,

Are you saying that when you click the GridDateTimeColumn header three times, that on the third click it doesn't sort your items? Meaning, the sort goes something like this for each click: 1st - ASC, 2nd - DESC, 3rd - Natural. If so, that is the correct way the sorting works in RadGrid. If you don't want the 3rd time they click on the column to remove the sort or return it back to Natural sort, you can set the AllowNaturalSort="false" on the MasterTableView.

I hope that helps.
0
Parth
Top achievements
Rank 1
answered on 03 Sep 2010, 02:38 PM
Got it Cori

Thanks,
Parth
Tags
Grid
Asked by
Parth
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Parth
Top achievements
Rank 1
Share this question
or