如何在datagridview中使用Checkedlistbox? [英] how to use Checkedlistbox in datagridview?

查看:183
本文介绍了如何在datagridview中使用Checkedlistbox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows申请表。其中包含一行的datagridview有多个选择。

I am using windows application form. In which contain datagridview with one column have multi selection.

推荐答案

检查需要一个类型为ListView或CheckedListBox的DataGridView自定义列 [ ^ ]


你用Google搜索了吗?



参考:

http://www.c-sharpcorner.com/Blogs/11558/adding-check-box-to-datagridview-column-without-using-datagr。 aspx [ ^ ]
Have you Googled it?

Refer it :
http://www.c-sharpcorner.com/Blogs/11558/adding-check-box-to-datagridview-column-without-using-datagr.aspx[^]


in your form you can just drag and drop a button control


//Code under the Button
    {
            int r;
            dataGridView1.Rows.Add();
            dataGridView1[0, r].Value = "" + checkedListBox1.Text;
            dataGridView1[1, r].Value = "" + checkedListBox2.Text;
            dataGridView1[2, r].Value = "" + checkedListBox3.Text;
        r++;
        }

i hope this will work for you


这篇关于如何在datagridview中使用Checkedlistbox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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