Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
I don't see the error anywhere in the post, so I'm going to assume that it's an InvalidCastException? Well, most likely, the field you're binding to is an enum field, and the combo box is populated with strings, so that's not going to work. Your best bet would be to use the PopulationType = Enumeration / PopulationEnumName = "enum name" on the combo box (they can be set through the property sheet). If you have to populate it programmatically, then you'll want to use the MicroFour.StrataFrame.Tools.Common.BuildDataTableFromEnum() method and pass over the combo box you want to populate. That method also takes advantage of the <EnumDisplayValueAttribute> that you can apply to the items in your enum (populates the combo box with what you place in the attribute, rather than the name of the enum value; easier on your users).
|