I load a RadCombo box via a store procedure. To that list I want to add an "All" item at position 0.
I tried doing it this way:
I tried doing it this way:
protected void rcbYear_PreRender(object sender, EventArgs e)
{
RadComboBox combo = sender as RadComboBox;
if (ViewState[combo.ClientID] != null)
{
var rcbi = new RadComboBoxItem();
rcbi.Attributes.Add("0", "All");
combo.Items.Insert(0, rcbi);
combo.DataBind();
}
}
I verified that when the combo box comes in has the values from the store proc. The method runs normally but the combo ends with the same items as when it came in.
Any ideas?