Hi,
we have radcombobox inside a user control (scheduler AdvancedEdit to be exact from a sample on your site). We are populating the RCB with values easily enough and passing a value to set the selected item as follows
public int EventTypeId
{
get
{
return Convert.ToInt32(ResrcbActivityType.SelectedValue);
}
set
{
try
{
RadComboBoxItem itm = new RadComboBoxItem();
if (value > 0)
itm = ResrcbActivityType.FindItemByValue(Convert.ToString(value));
if (itm != null)
{
itm.Selected = true;
}
}
catch (Exception ex)
{
}
}
}
When debugging the value when we set is non zero which is correct, the itm object is a valid radComboBoxItem object and itm.Selected = true; evaluates without error. However, the first item in the radcomboBox list is always displayed no matter what. I am guessing this is something stupid - please anyone?
we have radcombobox inside a user control (scheduler AdvancedEdit to be exact from a sample on your site). We are populating the RCB with values easily enough and passing a value to set the selected item as follows
public int EventTypeId
{
get
{
return Convert.ToInt32(ResrcbActivityType.SelectedValue);
}
set
{
try
{
RadComboBoxItem itm = new RadComboBoxItem();
if (value > 0)
itm = ResrcbActivityType.FindItemByValue(Convert.ToString(value));
if (itm != null)
{
itm.Selected = true;
}
}
catch (Exception ex)
{
}
}
}
When debugging the value when we set is non zero which is correct, the itm object is a valid radComboBoxItem object and itm.Selected = true; evaluates without error. However, the first item in the radcomboBox list is always displayed no matter what. I am guessing this is something stupid - please anyone?