﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Sort not sorting numbers correctly.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 10 Jun 2026 22:23:39 GMT</lastBuildDate><ttl>20</ttl><item><title>Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4673.aspx</link><description>I have a BO that is sorting on an int field (int in SQL Server).  However the sorted results are as if the field was alpha-numeric. I.e. it sorts 1, 10, 11, 12, 2, ect.  Am I missing a setting?  The field is an Int32 in the BO.</description><pubDate>Tue, 21 Nov 2006 13:33:38 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4702.aspx</link><description>I've read about the comparers.  I'm sure I'll be using them at some point.  And yeah, I won't soon forget this lesson...I've got the scares to remind me :D</description><pubDate>Tue, 21 Nov 2006 13:33:38 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4691.aspx</link><description>Just as a side note, you can get the behavior you want through a list...or any other type of object or collection for that matter.&amp;nbsp; You can create a comparer object that compares two values any way that you like.&amp;nbsp; In fact, the framework has a sorter for a ListView called the ListViewItemSorter.&amp;nbsp; This can be used as a&amp;nbsp;column sorter on a ListView.</description><pubDate>Mon, 20 Nov 2006 20:55:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4690.aspx</link><description>As I have mentioned before...I know that you won't have this problem again ;) and I think that you said something about ... "Yeah, pain teaches" :D</description><pubDate>Mon, 20 Nov 2006 20:52:11 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4689.aspx</link><description>The Sorted (of a listbox) property set to none...works great now...did I mention I was new to dotnet ;)</description><pubDate>Mon, 20 Nov 2006 17:51:40 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4688.aspx</link><description>Ah...I think the problem is that I'm using CopyData to fill a listbox and the listbox is sorting using alpha...the BO is sorting OK.  I'll have to think of how to handle this.</description><pubDate>Mon, 20 Nov 2006 17:41:11 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Sort not sorting numbers correctly.</title><link>http://forum.strataframe.net/FindPost4676.aspx</link><description>It should sort in integer order if the field created is in fact integer in the CurrentDataTable.&amp;nbsp; All we do is set the sort in the DefaultView of the DataTable (CurrentView property of the BO).&amp;nbsp; Open up the debugger, add the MyBO.CurrentDataTable to the watch window, and verify that the field is coming back as Int32.</description><pubDate>Mon, 20 Nov 2006 16:16:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>