Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Datagrid Control
Unusual sort in datagrid
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jim Nugent, post: 4259069"] Hello, I have a requirement to sort a column in a datagrid (bound to a dataview) that may contain blanks. The data needs to be in ascending order with the blanks at the end. Unfortunately, the standard sort algorithm thinks a blank or null is "less than" anything else so they end up at the top. I've thought of sorting, and then checking for blanks and stuffing them in at the end until I hit a non-blank, but I'm not sure how to do this with a dataset, and i'm not sure when the sorting actually occurs (probably NOT as soon as dataView.Sort is set to an expression). Probably on DataBind(). I've also considered adding a hidden column in which blanks are replaced by strings filled with the "heaviest" character (Z?) and sorting on that. Can anyone think of anything more elegant? Thanks in advance [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Datagrid Control
Unusual sort in datagrid
Top