Re: alpha numeric sorting for dataview
"caldera" <email@example.com> wrote in message news:Omdo1iobEHA.904@TK2MSFTNGP09.phx.gbl...
I have values which are numeric and string values. lets say 1,2 ,3 and like xc1,xc2 . I want to sort these values. First sorting numeric ones than none numeric ones. How can I do this with dataview or dataset
Thanks too much.
I don't believe it's possible to create your own sort order for a DataView or DataSet.
If you can get the information into an Array, you can write your own IComparer to use in Array.Sort. In fact, you could create yourself an array of pairs (rowIndex, key). You could then sort the array on the key using your custom IComparer implementation. You could then create a new DataTable by running through the sorted array, picking up the original row (by the rowIndex), and adding it to the new table. This new table would then be in the correct order.
johnwsaundersiii at hotmail
|All times are GMT. The time now is 07:52 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.