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

[Solved] Sort text as number

1 Answer 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Grymonprez
Top achievements
Rank 1
John Grymonprez asked on 11 Nov 2009, 12:09 PM
I have a grid where one column is numbers represented as text like this:
1.1.1
1.1.2
...
1.10.1
1.2.1

This sorting order is off, and I'm wondering if the radgrid can automatically correct this, so 10 is not smaller than 2.

Thanks for your help.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 11 Nov 2009, 04:42 PM
Hi John,

In your case you need to use custom sorting:

http://www.telerik.com/help/aspnet-ajax/grdapplycustomsortcriteria.html

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/sort/defaultcs.aspx

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
John Grymonprez
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or