Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I have built a SPgridview with Filtering, Sorting and Paging.
In the grid , i have one numeric type column and other are string columns.

There is a issue while filtering the numeric type column, the filter column showing the values in ascending order like (10000, 10001, 12,145,..... ).

Actually it sorting the values in string type instead of nueric type..

Expected result should be like that 12,145, 10000, 10001,.......

i have spent much time in google.. Not able to find the solution. Pls help.

How to fix the issue?
Posted
Updated 25-Jun-13 20:10pm
v2

1 solution

try this, change your field name according to your application
BoundField colDescriptione = new BoundField();
colDescriptione.DataField = "Description";
colDescriptione.HeaderText = "Description";
colDescriptione.SortExpression = "Description";
this.oGrid.Columns.Add(colDescriptione);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900