Closed chrisjainsley closed 10 years ago
I had this in mind for a while already. Just was waiting for somebody to ask :)
Awesome!!! I would like to have it as well! =]
Thanks!!
This is finally in the new version of BMVC. Sorry it took so long.
I was hoping you would have this, thanks. I just updated to 3.7.2 but i can't find a dropdown enum in the dll. How can i use this new feature?
I'll soon update docs for this. Meanwhile, here is a quick code snippets. Enum:
public enum Color
{
Red = 1,
Green = 2,
Blue = 3,
Yellow = 4
}
In the View Model:
public Color Color { get; set; }
In the View:
@f.FormGroup().DropDownListFromEnumFor(x => x.Color)
Check out extension methods on it also. They are similar extension methods used on other inputs.
I haven't had a chance to try it yet, but thanks again for the quick response, as always!
An enum drop-down list would be handy, similar to RadioButtonsFromEnum and RadioButtonsFromEnumFor.