winform CheckBoxList 判断选择项
winform CheckBoxList 如何判断选择了几项 和获取选择的值。。坐等答案~~~!!!
[解决办法]
chkList.Items[i].CheckState = CheckState.Checked ; //判断是否选中//然后获得值chkList.Items[i].Value.ToString();
[解决办法]
int count = checkedListBox1.Items.Count;
for (int i = 0;i<count;i++)
{
if (checkedListBox1.GetItemChecked(i))
{
MessageBox.Show(checkedListBox1.Items[i].ToString());
}
}