I tried to accomplished it by adding " " at the moment when I created items but it didn't worked. Those spaces (" ") were not recognized at the moment when items were rendered. Then I tried with double non breaking spaces ( ) but those were rendered like that in front of item's text.
At the end I've got it with:
item.Attributes.Add("style", "padding-left:10px;");
And drop down looks like on image below:

Generally speaking use attributes property whenever you need to apply some styles to items in drop down.
Cheers
No comments:
Post a Comment