Enum data type


Author
Message
kkchan
kkchan
StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)StrataFrame Novice (52 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

May I know what is the data type used by enum? I have a combobox that use enum as population. It hits error if I bind it to a integer field.



System.InvalidCastException was unhandled by user code

Message="Specified cast is not valid."

Source="InventoryBusinessObject"

StackTrace:

at JK.Inventory.BusinessObject.CompanyAddressBO.get_AddressTypeID() in F:\Projects\Inventory\InventoryBusinessObject\CompanyAddressBO.Designer.cs:line 321

at JK.Inventory.BusinessObject.CompanyAddressBO.Field_AddressTypeID_Descriptor.GetValue(Object component) in F:\Projects\Inventory\InventoryBusinessObject\CompanyAddressBO.Designer.cs:line 751

at System.Windows.Forms.BindToObject.GetValue()

at System.Windows.Forms.Binding.PushData(Boolean force)


Attachments
enumerror.JPG (136 views, 61.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
kkchan - 17 Years Ago
StrataFrame Team - 17 Years Ago
kkchan - 17 Years Ago
StrataFrame Team - 17 Years Ago
                     Hi,
I moved enum to enumeration.cs and try again.. still the...
kkchan - 17 Years Ago
                     Hi,
Sorry to trouble you again.
After some debugging, when I...
kkchan - 17 Years Ago
                         Hi,
Sorry, one more question here. I found that only integer...
kkchan - 17 Years Ago
                             When you add a new record, SF initializes all of the fields within the...
StrataFrame Team - 17 Years Ago
                                 Hi,
My enum do have 0 value

public enum myEnum...
kkchan - 17 Years Ago
                                     [quote] Hi, My enum do have 0 value public enum myEnum {Billing,...
StrataFrame Team - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search