I want my enum to sort numerically, not alphabeltically


Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi all.

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.

What do I have to do to fix this?

TIA.

Marcia
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Marcia,

Marcia G Akins (2/20/2012)
What do I have to do to fix this?

I believe there is a Sort property in the combo that will allow you to control that issue.

Edhy Rijo

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Edhy Rijo (2/20/2012)
Hi Marcia,

Marcia G Akins (2/20/2012)
What do I have to do to fix this?

I believe there is a Sort property in the combo that will allow you to control that issue.


I did not see a setting for this in the BrowseDialog.
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Marcia,

Marcia G Akins (2/21/2012)I did not see a setting for this in the BrowseDialog.

Ooops, I missed the "BrowseDialog" part Crying  I believe the Combobox.Sorted property is not exposed in the BrowseDialog.

Edhy Rijo

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Edhy Rijo (2/21/2012)
Ooops, I missed the "BrowseDialog" part Crying  I believe the Combobox.Sorted property is not exposed in the BrowseDialog.


So are you telling me that there is no way to accomplish this?
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Marcia G Akins (2/21/2012)
So are you telling me that there is no way to accomplish this?

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.

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.  Sorry!!! Crying

Edhy Rijo

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Edhy Rijo (2/21/2012)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.

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.  Sorry!!! Crying


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.

-- Marcia
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
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.

Public Enum MyEnum As Integer
    <MicroFour.StrataFrame.Tools.EnumDisplayValue("01 - January", False)> _
    Item1 = 1
    <MicroFour.StrataFrame.Tools.EnumDisplayValue("02 - February", False)> _
    Item2 = 2
    <MicroFour.StrataFrame.Tools.EnumDisplayValue("03 - March", False)> _
    Item3 = 3
End Enum

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi Ivan.

Thanks. That is what I have already done Smile

Marcia
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)Strategic Support Team Member (3.4K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
You're welcome Marcia. Glad you got it working. Cool
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search