StrataFrame Forum

ComboBox vs. ComboBoxEdit

http://forum.strataframe.net/Topic13172.aspx

By Bill Cunnien - 12/26/2007

If I use the standard SF control, combobox, my form works just fine; however, we have invested a good chunk into the DevExpress control suite, so I thought I would see how these work within the framework.  Since I am still working on the trial software, I downloaded the 6.3.3 version of DevExpress and installed it.  Then, I added the SF wrapped 6.3 controls to the VS IDE.  After dropping a comboBoxEdit control onto the form, I went through the exact same motions as I did for the SF comboBox.  Then, F5. 

The ComboBoxEdit is filled with data; however, the selected value never changes.  The visual behavior is as if it snaps back to the top of the list (a blank item) after I pick a different item on the list.  If I add a topmost item to the wrapped control, it does the same thing.  If I attempt to change the SelectedItem property from -1 to 0, the SelectedItem property reverts back to -1 as soon as I tab off of that field. 

Please note that I am using the PopulationType as Enumeration.  And, also note, the enum list performs beautifully on other forms by using the non-DevEx ComboBox control.

Thanks!
Bill

By Greg McGuffey - 12/28/2007

Bill,



I've had no experience with DevX controls, so I'm no help at all. However, I'm sure that those who do will respond...once the holiday season is over. They're probably out perusing the after Christmas sales, looking for that special xmas mouse pad or maybe little ear muffs for their mice... w00t



Just bump this one up next Wednesday if you haven't gotten a response yet.
By Bill Cunnien - 12/28/2007

For those with cold hands, maybe a little mouse sweater would be nice. Tongue

Thanks,
Bill

By Greg McGuffey - 12/28/2007

ROFL!
By Bill Cunnien - 1/2/2008

Little activity on the forums, again, today.  Are the SF gang still out?  Still need help on this issue, too.

Thanks!
Bill

By Bill Cunnien - 1/4/2008

Still looking for help on this one...bump... Smile
By Paul Chase - 1/4/2008

Bill,

I use the Combo Edit controls throughout my app with both Enums and Business Objects as the Population Datasource without any problems so they "should" work. It kinda sounds like you did not bind it to anything . can you post a screenshot of the properties sheet with the SF stuff?

By Bill Cunnien - 1/4/2008

Hi Paul,

Attached is the properties screen snippet.

Thanks!
Bill

By Trent L. Taylor - 1/4/2008

The problem that you are having is the Enum in this case.  The DevExpress Enum is trying to save the value back as an Enum value rather than the integer.  This is a common problem with the DevEx combo.  You can actually work around this problem by making sure that your BO has that field strong-typed as that enum type rather than an integer.  For example, your divisionindex property is probably not currently typed as the Enum to which you are binding, but rather an integer.  If you open up the BO Mapper, and add a customization to the divisionindex field to be typed as the Enum (Division) then rebuild your partial class, your bindings should start working.  SF will manage the value back to the database as an integer for you but it will allow you to communicate in code (or the DevEx bindings) as an enum which is really nice on the code side of things because you can use the Intellisense.

We are back in the office and trying to catch up...lots to do Smile  So sorry for the slow responses, but we are getting back on top of things. Wink

By Bill Cunnien - 1/5/2008

Well...that makes sense.  I'll check it out tomorrow.  Thanks, again!! Smile
By Bill Cunnien - 1/8/2008

Very nice.  It works as you suggested.  Simple.  Sweet.  Effective.

Btw, for any else who may need this, my namespacing syntax for assigning the enum to the custom type of the BO was as follows:

ApplicationName.ProjectName.ClassName.EnumName

Smooooth