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

Need Integer sorting but database field is String Type

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PHANI
Top achievements
Rank 1
PHANI asked on 12 Sep 2012, 04:16 PM
Hello Telerik Team,

I have a radgrid with a HyperlinkColumn, i'm binding a string type field. Let say "Order Number" field is a String Data Type in the database, which accepts alphanumeric. But for some clients, they use only Integer Type "Order Number", they want to sort like an integer.

1)  First constraint, i cannot change the database type field per client. This would be a standard string type field across all client databases.
2) I mention the DataType Property for HyperlinkColumn as System.Int32, but sorting still sort like a string. Ex.: 1, 12, 13, 2, 21, 22 etc..

Any work arounds please. Its an urgent req..

Thanks,
Phani.


1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 17 Sep 2012, 08:11 AM
Hi Phani,

Thank you getting back to us.

Please note that sorting depends on the data type of the specific field and in case you need to sort string type of column as DateTime, Numeric or any other type of content, it is obligatory to create a new field with the mentioned data type to use the default sorting functionality of RadGrid for the selected type.

I hope the clarification was helpful.

All the best,
Eyup
the Telerik team
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 their blog feed now.
Tags
Grid
Asked by
PHANI
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or