Microsoft
Software
Hardware
Network
Question : Sorting a Grid View Column
Hi,
I am using Custom Sorting on Grid View .I have done sorting using the foll methods in the URL
http://msdn.microsoft.com/
en-us/libr
ary/
system
.web.ui.we
bcontrols.
gridview.s
orting.asp
x
but when the sorting is applied on a column only on the first digit...
for eg : if the column values are : 5675, 422,30,22445,1000 ..it is sorting by the first digit ..that is
like it is just checking 5,4,3,2,1 which are the first digits mentioned above.
Can anyone let me know how can we fix this issue?
Thanks!
Answer : Sorting a Grid View Column
Convert the strings to ints (Convert.ToInt32(dbvalue))
or modify your data type to int. If they are all and will all be numeric, it is probably best to modify the SQL data type.
Random Solutions
When exporting Access 2003 report to Excel 2003, I get a message "File Error, Some number formats may have been lost." and my Date field is corrupted to a seemingly random number.
writing a fixed length text file
remote web workplace and full screen setting not working
AD active user count
How do I find the names of all printers installed on a computer?
Paging File Settings
Set up ISAPI module on IIS7
I am trying to add an edit, delete function to an existing gridview
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI<wbr />_AS" and "Latin1_General_CI_AS" in the equal to operation
Populate a combo box based on selection from previous combo box