Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
How to DataBind a multiselect UltraComboEditor to an Enum
posted
I have an integer field in the database, that can store the values of an enumeration.
The enum has the [Flags] attribute, that means its values are bitmasked and can be combined.
How can I show up the field in a Grid resp. in a multiselect Combobox?
 
A singleselect enum is no problem, I can use the ValueList property of the column resp. of the editor.
To allow multiselect, I could use the CheckedListSettings of the UltraComboEditor.
But how to set/get the values via DataBinding?
 
Taking the enum E:
[FlagsAttribute]
public enum E { One=1, Two=2, Four=4, Eight=8 }
 
If the field has the value 3, than the items One and Two should be selected in the DropDownList.
If I select the item Four too, than I have to save the value 7 to the field.
Which property of the UltraComboEditor should I DataBind to the field?
Parents Reply Children
No Data