将项目和值添加到Windows应用程序中的C#checkboxlist

问题描述:

嗨所有

我怎样才能添加项目和那些值到Windows申请表(复选框列表)



当我检查时一些商品名称我需要获得我选择的所有价值>





请帮帮我:)



我尝试了什么:



hi all
how can i add items and there values to windows application form ( checkboxlist)
?
and when i check on some items name i need to get all values i choose >


please help me :)

What I have tried:

hi all
how can i add items and there values to windows application form ( checkboxlist)
?
and when i check on some items name i need to get all values i choose >


please help me :)

获取检查清单

Get checked list by
foreach (Object item in checkedListTrainingRoom.CheckedItems)
{
    MessageBox.Show(item.ToString() + " is Checked");
}


参考并尝试



https://www.dotnetperls.com/checkedlistbox [ ^ ]

https://www.youtube。 com / watch?v = JEejAbEfHZc [ ^ ]

https://www.youtube.com/watch?v=kTrw04aEAXM [ ^ ]



refer this and try

https://www.dotnetperls.com/checkedlistbox[^]
https://www.youtube.com/watch?v=JEejAbEfHZc[^]
https://www.youtube.com/watch?v=kTrw04aEAXM[^]

foreach (KeyValuePair<string,string> item in checkedListTrainingRoom.CheckedItems)
          {
              string value = item.Value;
          }