StrataFrame Forum
Back
Login
Login
Home
»
.NET Forums
»
General .NET Discussion
»
Enum data type
Enum data type
Post Reply
Like
0
Enum data type
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
kkchan
kkchan
posted 17 Years Ago
ANSWER
Topic Details
Share Topic
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
)
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Enum data type
kkchan
-
17 Years Ago
When you populate a combo box from an enum, you have to bind the combo...
StrataFrame Team
-
17 Years Ago
Hi,
Thank you for reply.
However, I still unable to make it....
kkchan
-
17 Years Ago
Do you have the enum defined in 2 different locations? Within both the...
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
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search