将项目和值添加到Windows应用程序中的C#checkboxlist [英] Add items and values to C# checkboxlist in windows application

查看:70
本文介绍了将项目和值添加到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;
          }


这篇关于将项目和值添加到Windows应用程序中的C#checkboxlist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆