DateTime column Sorting problem - Please Urgent

Hi,
I have a column StartDate type Datetime. But when i click on
column header for sorting it is not sorting properly in acs or desc. it
is showing sorting only on month part of date
Like
08/21/2012
07/21/2014
06/26/2013
06/26/2013
It is in descending order but it is wrong.

But still it is not working. When my data come from database and i have not apply any sorting from grid than it is working fine but when i am going to apply from column it shows wrong data. Please help still not working fine with your code as well.

Viktor Tachev

I tried replicating the scenario displayed on the screenshot but to no avail. I used the same settings for the GridBoundColumn as the ones you have set. When the RadGrid is sorted it produces the expected result on my end - the whole date is taken into account. You would find a sample project attached. Give it a try and see if it is working as expected on your end.

If you have custom sorting for the column, try disabling it and see if the result is different.

Regards,
Viktor Tachev
Telerik

If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.

Shafqat

Thank you so much. my issue is fixed now, actually i was converting the date column to Varchar through SQL Function Convert(varchar(10),startDate,101) before Binding to Grid, that's why sorting was not working correctly. Now i am converting date column to Date with SQL Function CAST(DoBirth AS DATE) before binding to Grid.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.