Hi, I am using the RADCombo. As per the requirement I have to format(Red color in my example) some items in the combobox based on some conditions.Formatting is done absolutely fine, but I face problem when the formatted item is selected. If a non-formatted item is selected then no issues, BUT if the user selects the formatted item, the formatting is not displayed but it simply shows the item without any format e.g. without any color in this case. I attach the simple code snipptes for your refence. please do the needful. protected void Page_Load(object sender, EventArgs e) |
{ |
if (!IsPostBack) |
{ |
LoadData(); |
} |
} |
private void LoadData() |
{ |
// Add 1st Item |
Telerik.Web.UI.RadComboBoxItem aItem; |
aItem = new Telerik.Web.UI.RadComboBoxItem("Item2-invalid", "1"); |
aItem.Attributes.Add("style", "background-color: ORANGERED"); //Make the back color Red |
aItem.ToolTip = "Invalid"; |
ddl1.Items.Add(aItem); |
// Add 2nd Item |
aItem = new Telerik.Web.UI.RadComboBoxItem("Item1", "2"); |
ddl1.Items.Add(aItem); |
// Add 3rd Item |
aItem = new Telerik.Web.UI.RadComboBoxItem("Item3", "3"); |
ddl1.Items.Add(aItem); |
// Add 4thItem |
ddl1.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0")); |
} |
<form id="form1" runat="server"> |
<div> |
<VStars:ScriptManager ID="mgr1" runat="server"></VStars:ScriptManager> |
<VStars:ComboBox ID="ddl1" runat="server"> |
</VStars:ComboBox> |
</div> |
</form> |
Thanks
Sushil Jinder