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

Sorting of Date column fileds problem

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sks sks
Top achievements
Rank 1
sks sks asked on 13 Apr 2010, 08:31 AM

Hi, all

When i am using any sorting on the date column field, the result is comes according to the string format. where i specified that the datatype="system.datatime"..

 

<

 

 

telerik:GridBoundColumn DataField="BatchDate" UniqueName="BatchDate" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}" DataType="System.DateTime">

 

 

 

 

 

 

 

</telerik:GridBoundColumn>

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 13 Apr 2010, 05:19 PM
Hello,

To achieve the desired functionality I suggest you include SortExpression property for the column and check whether its working as expected.
ASPX:
<telerik:GridBoundColumn DataField="BirthDate" DataType="System.DateTime"   
    HeaderText="BirthDate" SortExpression="BirthDate" UniqueName="BirthDate" DataFormatString="{0:MM/dd/yyyy}">  
</telerik:GridBoundColumn>  

Kind regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
sks sks
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or