On my ASPX page I've added Dropdownlist.
Elements in this list are divided to groups by adding disabled list items:
ListItem separator = new ListItem("---My friends---", "");
separator.Attributes.Add("disabled", "true");
_ddUsersList.Items.Add(separator);
Those list items are grayed, I can't select it by mouse or by clicking cursor arrows(up/down). That is correct.
But problem is, that after clicking '-' key this list item is selected. I think that it is Dropdownlist bug, but I need to find some solution for this.
How to prevent selecting disabled ListItems by clicking first letter from its title? Or there is better way to create separators in Dropdownlist?
Edit: I've checked it after Nico G. comment. This problem happens in IE, not in Firefox. (I have no other browsers. Two is enought:) )