My ComboBox is not seeing my enum


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

I must have taken my stupid pills today because this should be simple.

My enum is defined in the form like this:

public enum Months : int { January = 1, February = 2, March = 3, April = 4, May = 5, June = 6, July = 7, August = 8, Spetember = 9, October = 10, November = 11, December = 12 };

The combo box is set up like this:

this.cboyearend_mth.BindingField = "yearend_mth";

this.cboyearend_mth.BusinessObject = this.boPlan_hdr;

this.cboyearend_mth.BusinessObjectEvaluated = true;

this.cboyearend_mth.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;

this.cboyearend_mth.FormattingEnabled = true;

this.cboyearend_mth.Location = new System.Drawing.Point(120, 162);

this.cboyearend_mth.Name = "cboyearend_mth";

this.cboyearend_mth.ParentContainer = this;

this.cboyearend_mth.PopulationType = MicroFour.StrataFrame.UI.ListPopulationType.Enumeration;

this.cboyearend_mth.PopulationEnumName = "Trinity.Forms.Months";

this.cboyearend_mth.Size = new System.Drawing.Size(121, 21);

this.cboyearend_mth.TabIndex = 13;

But when I run the form, nothing shows up in the drop down list. I have no idea what the problem could be.


Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Glad you found your issue.  The only time that you will generally have an issue with the VS DTE not "seeing" an enum when you know with all of your being that it should is when the AppDomain of the DTE is holding on to an older version of an assembly and will not load the newly built assembly housing the enum.  This is common if the assembly is stored in the GAC and from time to time VS just doesn't want to let go for unknown reasons.  But at any rate, it looks as though you were already on top of it Smile
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