从checkcombobox获取选定值的问题 [英] Problem about get selected value from checkcombobox

查看:123
本文介绍了从checkcombobox获取选定值的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SqlConnection cs = new SqlConnection("Data Source=*");
            SqlDataAdapter adapter = new SqlDataAdapter("SELECT personnelID,personnelNAME + ' - ' + personnelFAMILY AS Information FROM  Table_personnel WHERE(personnelROLE = '3' or assupervisor=1)and activeuser=1 and personnelID>100", cs);
            DataTable dataTable = new DataTable();
            adapter.Fill(dataTable);
            checkBoxComboBox2.DataSource = new ListSelectionWrapper<DataRow>(dataTable.Rows, "Information");
            checkBoxComboBox2.DisplayMemberSingleItem = "Name";
            checkBoxComboBox2.DisplayMember = "NameConcatenated";
            checkBoxComboBox2.ValueMember = "Selected";





我的尝试:





What I have tried:

hi
i use check combo box component in this link<a href="https://www.codeproject.com/Articles/21085/CheckBox-ComboBox-Extending-the-ComboBox-Class-and"></a>

 and i change data table to this code



but when i get selected value for using in program give error 
no body use this values?!

推荐答案

不要在快速答案下发布 - 如果您从文章中获得了代码,那么该文章底部的添加评论或问题按钮,会将电子邮件发送给作者。然后他们会被告知你希望与他们交谈。

在这里发布这个依赖于他们匆匆而过并意识到这是为了他们。
Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


这篇关于从checkcombobox获取选定值的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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