Data binding [flag] enum


Author
Message
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I would like to use flag enum to store combination of multiple values. How could I find to checkbox for this?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
It sounds like you are trying to create a bitwise enum using the Flag attribute.  This is a very good approach when you may want to store multiple values into a single integer field.  Binding to a checkbox is going to have to be something done on your side and totally depends on your logic.  By deafult, this logic will not work as a checkbox is a Boolean which is a Bit or only supports 0 and 1.  Since your enum will already exceed this logic, you may be better suited going with a combo box or a checked list box.  Something of that nature.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.5K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
One possibility to handle this logic would be to handle it with custom field properties. Add custom field properties which set or clear the flag in the main, db linked, bitwise enum field. You could then directly link these custom fields to the bitwise enum field.
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