c# - Entity Framework 6 code first enum data binding -


i have entity product has among fields producttype field, values enum:

public enum producttype : int {     undefined = 0,     simple = 1,     composed = 2 } 

when display form add or edit product, load values enum in combobox corresponding product type this:

typecombobox1.datasource = enum.getvalues(typeof(producttype)); 

it loads values fine, , saves value products table correctly.

i want when value changes show / hide button, based on selected value. not happening, product entity has initial value set, correct value saved table.

btneditchoices.visible = _product.type == producttype.composed; 

any ideea why value not updated on combobox change?

thanks!


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -