DanielMore
New Member
I have a query that returns 6 fields and those are then ORDER BY my description field. Unfortunately, this is the standard ASCIIbetical sort, 1 and 100 before 2, etc...<BR><BR>I would like to use the sort ability of an arraylist on the dataset before the grid displays it, any thoughts on this?<BR><BR>data sample, the description field of 4 records..<BR>Aluminum Sulfide<BR>I0 24.57XY1<BR>B 4.0005I<BR>I0 24.57Z1<BR><BR>thanks<BR>M<BR>You said the query is sorted by description, but the example you displayed is not sorted.<BR><BR>You said you want to sort the results by the number in the description field, but the number in the description field is (possibly) the second word in the field? I think you are SOL unless you create a new numeric field in your table and populate it with the data you want to sort by.<BR><BR>Sure, you could build a goofy function that parses the description field and pulls out numeric values and casts them to floats and then sorts your data...but you may have more fun shoving forks in your eyes. ;-)My apologies, I didnt clarify, the sample data is raw data, that is in the description field of the database table. IF you do an order by, you get it sorted, number first(in order), then alphabetically(in order). I need to order it in a sorted fashion, special characters, then alphabetically, then numerically so the end resutl would be:<BR><BR>Aluminum Sulfide <BR>B 4.0005I <BR>I0 24.57XY1 <BR>I0 24.57Z1 <BR><BR>I thought about changing the collate on the database table, but then came up with the idea of creating objects in an ArrayList and then sorting it. Then binding the list to the grid.<BR>