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

Problem Sorting by Int Columns with No Values

3 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 06 May 2010, 11:48 AM
Guys,

i'm having a bit of a problem on my RadGrid, we have an ID column. We have to have blank ID values in our ID column thats being bound... so we've passing in our ID as a string to the RadGrid at the moment, unfortunatly on SORT its sorting it as a String rather than and INT... any ideas of how to get by this so our sort works correctly.. please find the attached image of whats currently happening...


3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 10 May 2010, 05:17 PM
Hello kevin,

If you are passing the data as strings it is just natural to get the behavior in question. Could you elaborate on the reason for leaving out the Int datatype? Having blank values is all right for a GridBoundColumn of type System.Int32.

Regards,
Tsvetoslav
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
Kevin
Top achievements
Rank 2
answered on 20 May 2010, 12:26 PM
Hey guys thanks for quick response....

sorry for my slow response

The reason for leaving out the int datatype is probably because we are merging two different tables into a DataTable, and the data table cant handle blank int values...  not sure if you can suggest anything for when we insert this into the RadGrid?
0
Tsvetoslav
Telerik team
answered on 26 May 2010, 07:55 AM
Hi kevin,

The DataTable type is capable of handling blank values or more precisely System.DbNull ones. Attached is a small sample demonstrating this.

Regards,
Tsvetoslav
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
Kevin
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
Kevin
Top achievements
Rank 2
Share this question
or