Question

I want to create a dropdownlist which have three static values: Select All, Text Only, Numeric only. After that I like to add a line with some padding (just to separate these options) and then add some dynamic options.

I am not sure how to do this, Can some body please help?

So far I have created a List<SelectListItem> in my view model, and populated the static values from BLL. But I am not sure how to add a divider line in the middle now, and append some dynamic options after that.

Thanks

Was it helpful?

Solution

The normal select tag will not work like that, you will have to create custom dropdown using spans or divs.

See some examples here:

http://tympanus.net/codrops/2012/10/04/custom-drop-down-list-styling/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top