This question is locked. New answers and comments are not allowed.
Hello,
I need to have the background of the drop down portion of my combobox have alternating colors. I can accomplish this with an event handler for the ItemDataBound event and a simple counter like this:
I would like to get this behavior using a theme. Is it possible? I see there is an IsOdd property on the grid, is there something similar for the combobox?
Thanks,
-Gary
I need to have the background of the drop down portion of my combobox have alternating colors. I can accomplish this with an event handler for the ItemDataBound event and a simple counter like this:
private void radComboBox1_ItemDataBound(object sender, Telerik.WinControls.UI.ItemDataBoundEventArgs e) |
{ |
i++; |
FillPrimitive fpOneDropDownItem = (e.DataBoundItem.Children[0] as FillPrimitive); |
fpOneDropDownItem.BackColor = (i % 2 == 0) ? ColorTranslator.FromHtml("#000000") : ColorTranslator.FromHtml("#262626"); |
fpOneDropDownItem.NumberOfColors = 1; |
} |
I would like to get this behavior using a theme. Is it possible? I see there is an IsOdd property on the grid, is there something similar for the combobox?
Thanks,
-Gary