摘要:
扩展DropDownList控件和ListBox控件:
通过DropDownList控件和ListBox控件的.Items.Add(ListItem item)方法,来为其添加optgroup标签,从而实现分组功能
使用方法
1、设置属性:
OptionGroupValue - 用于添加DropDownList(ListBox)控件的分组项的ListItem的Value值(默认为optgroup)
2、使用DropDownList(ListBox)控件的.Items.Add(ListItem item)方法:
OptionGroupValue为默认值时:SmartDropDownList.Items.Add(new ListItem("中国", "optgroup")); 阅读全文