On my ASPX page, I added a Dropdownlist.
Elements in this list are divided into groups, adding disabled list items:
ListItem separator = new ListItem("---My friends---", ""); separator.Attributes.Add("disabled", "true"); _ddUsersList.Items.Add(separator);
These list items are grayed out, I can not select it with the mouse or by clicking the cursor arrows (up / down). It is right.
But the problem is that after clicking the "-" button, this list item is selected. I think this is a Dropdownlist error, but I need to find some solution for this.
How to prevent the selection of disabled ListItems by clicking the first letter of its name? Or is there a better way to create separators in Dropdownlist?
Edit: I checked it after Niko's comment. This issue occurs in IE, not Firefox. (I have no other browsers. Two is enough :))
Marek kwiendacz
source share