How can i make my DropDownListFor support optgroup? Is there anyway to do it? Notice that this is DropDownListFor, means that it support DataAnnotation client validation
How can i make my DropDownListFor support optgroup?
There is no built-in support in the framework for this kind of drop down lists. You will have to write your own custom helper or generate the HTML manually (I would tend towards the first option).