﻿<?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 » WinForms (How do I?)  » I want my enum to sort numerically, not alphabeltically</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 09 Sep 2026 08:32:59 GMT</lastBuildDate><ttl>20</ttl><item><title>I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30938.aspx</link><description>Hi all.&lt;br/&gt;&lt;br/&gt;This one has to be simple. I have an enum for months of the year. I am populating a combo box iin my browse dialog from the enum. But when the browae dialog is displayed, it displays the months in alphabetical order, not the order in which they appear in the year.&lt;br/&gt;&lt;br/&gt;What do I have to do to fix this?&lt;br/&gt;&lt;br/&gt;TIA.&lt;br/&gt;&lt;br/&gt;Marcia</description><pubDate>Wed, 22 Feb 2012 09:10:55 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30966.aspx</link><description>You're welcome Marcia. Glad you got it working. &lt;span&gt;:cool:&lt;/span&gt;</description><pubDate>Wed, 22 Feb 2012 09:10:55 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30964.aspx</link><description>Hi Ivan.&lt;br/&gt;&lt;br/&gt;Thanks. That is what I have already done :)&lt;br/&gt;&lt;br/&gt;Marcia</description><pubDate>Wed, 22 Feb 2012 08:25:52 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30955.aspx</link><description>The combobox won't automatically sort a BO content when populated with it, so your order_num should be fine, you just need to use a FillMethod that brings the table on whatever order you need. For the enums, I guess you could use a dummy BO to populate with your enum contents and then use the BO to populate the combobox. Or you could define your enum with numbers and text, something like "01 - January", "02 - February" and so on.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]Public Enum MyEnum As Integer&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("01 - January", False)&amp;gt; _&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item1 = 1&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("02 - February", False)&amp;gt; _&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item2 = 2&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MicroFour.StrataFrame.Tools.EnumDisplayValue("03 - March", False)&amp;gt; _&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Item3 = 3&lt;br/&gt;End Enum[/codesnippet]&lt;/span&gt;</description><pubDate>Wed, 22 Feb 2012 03:19:14 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30954.aspx</link><description>[quote][b]Edhy Rijo (2/21/2012)[/b]Well, basically that I don't see a clear way to do this without modifying the SF Browser Dialog Source code to expose the ComboBox.Sorted property which would allow you to control the sorting at runtime.&lt;br/&gt;&lt;br/&gt;I spend sometime with the BD trying to get to this property via any of the BD events, but could not find a way to do it.&amp;nbsp; Sorry!!! &lt;SPAN&gt;&lt;SPAN&gt;:crying:&lt;/span&gt;&lt;/span&gt;[/quote]&lt;br/&gt;&lt;br/&gt;That is really a damn nuisance. I have a field on my lookup tables called order_num and guess what it does? Very often , as in the case of months of the year, it makes no sense to sort things alphabetically. I am quite capable of making sure that the data is sorted the way that I want it.&lt;br/&gt;&lt;br/&gt;-- Marcia</description><pubDate>Tue, 21 Feb 2012 11:29:23 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30953.aspx</link><description>[quote][b]Marcia G Akins (2/21/2012)[/b][hr]So are you telling me that there is no way to accomplish this?[/quote]&lt;br/&gt;Well, basically that I don't see a clear way to do this without modifying the SF Browser Dialog Source code to expose the ComboBox.Sorted property which would allow you to control the sorting at runtime.&lt;br/&gt;&lt;br/&gt;I spend sometime with the BD trying to get to this property via any of the BD events, but could not find a way to do it.&amp;nbsp; Sorry!!! &lt;span&gt;&lt;span&gt;:crying:&lt;/span&gt;&lt;/span&gt;</description><pubDate>Tue, 21 Feb 2012 10:51:24 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30952.aspx</link><description>[quote][b]Edhy Rijo (2/21/2012)[/b][hr]Ooops, I missed the "BrowseDialog" part&amp;nbsp;&lt;SPAN&gt;&lt;SPAN&gt;:crying:&lt;/span&gt;&lt;/span&gt;&amp;nbsp; I believe the Combobox.Sorted property is not exposed in the BrowseDialog.[/quote]&lt;br/&gt;&lt;br/&gt;So are you telling me that there is no way to accomplish this?</description><pubDate>Tue, 21 Feb 2012 10:42:53 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30951.aspx</link><description>Hi Marcia,&lt;br/&gt;&lt;br/&gt;[quote][b]Marcia G Akins (2/21/2012)[/b]I did not see a setting for this in the BrowseDialog.[/quote]&lt;br/&gt;Ooops, I missed the "BrowseDialog" part&amp;nbsp;&lt;span&gt;&lt;span&gt;:crying:&lt;/span&gt;&lt;/span&gt;&amp;nbsp; I believe the Combobox.Sorted property is not exposed in the BrowseDialog.</description><pubDate>Tue, 21 Feb 2012 08:38:14 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30950.aspx</link><description>[quote][b]Edhy Rijo (2/20/2012)[/b][hr]Hi Marcia,&lt;br/&gt;&lt;br/&gt;[quote][b]Marcia G Akins (2/20/2012)[/b][hr]What do I have to do to fix this?[/quote]&lt;br/&gt;I believe there is a Sort property in the combo that will allow you to control that issue.[/quote]&lt;br/&gt;&lt;br/&gt;I did not see a setting for this in the BrowseDialog.</description><pubDate>Tue, 21 Feb 2012 07:15:02 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: I want my enum to sort numerically, not alphabeltically</title><link>http://forum.strataframe.net/FindPost30941.aspx</link><description>Hi Marcia,&lt;br/&gt;&lt;br/&gt;[quote][b]Marcia G Akins (2/20/2012)[/b][hr]What do I have to do to fix this?[/quote]&lt;br/&gt;I believe there is a Sort property in the combo that will allow you to control that issue.</description><pubDate>Mon, 20 Feb 2012 10:06:51 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>