Code clarity: MVC 2 DropDownListFor - Any troubles? - Part 2

added by hkurabko
7/14/2010 1:26:09 AM


Hello again. Today I want to talk about select list with optgroups. So, I need such a list. MVC has no support for it. What to do? After little browsing I decide wrote my own solution. It is based on code from fixed version of MVC DropDownList (you can read about it in Part 1). Main features of the list: * of course - support of groups of options * you can use it with options and with groups of options in any order, iow first item can be option, then - option group, and at the end, again - option.