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

radgrid binding + numeric string sort

4 Answers 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rachel
Top achievements
Rank 1
Rachel asked on 28 Jul 2010, 06:54 AM
hi,
i have a class that i'm binding to the grid.
this class contain several properties, one of them is value.
property value is of type string.
when all the data in column value is of type int,
sorting it looks something like this:
1
100
150
2
4
...
is there any way that i can numeric string sort it?
1
2
4
100
150
....

thanks!
Rachel

4 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 28 Jul 2010, 06:59 AM
Hello Rachel,

 The grid cannot sort string values as integers.

Regards,
Vlad
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
0
Rachel
Top achievements
Rank 1
answered on 28 Jul 2010, 07:06 AM
thanks for the quick reply! :)
what if i add another column to the grid (not part of the binding)
and add to it int values? is that possible?
how can i go through the grid row and set the specific column int value?
0
Vlad
Telerik team
answered on 28 Jul 2010, 07:13 AM
Hi Rachel,

 The best way to handle such scenario is to create new model on the top of your original data and add new property to this model.

Best wishes,
Vlad
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
0
Rachel
Top achievements
Rank 1
answered on 28 Jul 2010, 07:29 AM
thanks!
Tags
GridView
Asked by
Rachel
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Rachel
Top achievements
Rank 1
Share this question
or