I have this simple Enum defined:
public enum Grade : byte
Up = 1,
Down = 2,
Flat = 4
I've tried using it to populate a DropDown ListBox like this:
ddList.DataSource = Enum.GetValues(typeof(Constants.Grade));
The problem is that BOTH the Text and the Value of each ListItem ends up with the text string. What I want, of course, is for each ListItem's Value property to be populated with the numeric value.
Is there a simple way to do this?
View Complete Post