winform获取checkedListBox控件的值
分类:winform 人气:875 评论:0 时间:2010-05-24 14:20
string ShopTypeIds = "";
for (int i = 0; i < clb_ShopType.CheckedItems.Count; i++)
{
DataRowView dv = ((DataRowView)clb_ShopType.CheckedItems[i]);
if (ShopTypeIds == "")
{
ShopTypeIds = dv["id"].ToString();
}
else
{
ShopTypeIds += "," + dv["id"].ToString();
}
}