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

sorting in radgrid

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sanjeev
Top achievements
Rank 1
Sanjeev asked on 05 Sep 2012, 12:41 PM
i have a radgrid in my ASP.net project.  One column fo radgrid contains both strings(string is 'NIL') and numbers. i want to faciliate sorting in the grid. but for the column i mentioned above, sorting is not working fine for numbers. so during sorting i want to make string 'NIL' data to 0 and want to sort column as number column. how i can make string 'NIL ' to 0 in Onsortcommand method. Please help me


Also i had given string property as data in that column for giving 'NIL' as data. If i am giving integer data, its wont accept 'NIL'. so at the time of sorting i have to consider alld ata as integer. only then soring will work. Please suggest me an idea

1 Answer, 1 is accepted

Sort by
0
Sanjeev
Top achievements
Rank 1
answered on 06 Sep 2012, 04:38 AM
Thanks.

I got the solution. I added another column in gird with invisible property and that contains data from integer property. And i set sortexpresssion of invisible column for the original column
Tags
Grid
Asked by
Sanjeev
Top achievements
Rank 1
Answers by
Sanjeev
Top achievements
Rank 1
Share this question
or