【发布时间】:2015-11-04 03:31:54
【问题描述】:
我有一个如下所示的 RadComboBox
<radC:RadComboBox ID="lstMaterial" runat="server" Width="100px" Height="100px" DropDownWidth="100px" />
在 aspx.cs 页面中根据条件需要从上面的 RadComboBox 控件中添加和删除多个项目,如下所示。
if(isTrue)
{
//Remove
List<string> strRemoveList = new List<string>();
strRemoveList.Add(lstMaterial.FindItemByText("Wood1").ToString());
strRemoveList.Add(lstMaterial.FindItemByText("Seam").ToString());
strRemoveList.Add(lstMaterial.FindItemByText("wood2").ToString());
// lstMaterial.Items.Remove(strConstructionStyleRemoveList);
//foreach(RadComboBoxItem rcbi in lstConstructionStyle.Items)
// {
// rcbi.Remove(strRemoveList);
// }
}
【问题讨论】:
标签: c# radcombobox