如何在datagridview单元格中有一个列表框 [英] How to have a listbox in datagridview cell

查看:77
本文介绍了如何在datagridview单元格中有一个列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Evryone



我希望在dataGridview中的特定列单元格中有列表框



为什么我这样做了吗?



因为我有一个xml结构,其中一些参数有多个值



以及为什么我不为每个单元格使用多行文本?

因为每个值都有一个其他相关值,这对用户是隐藏的,我想使用listbox valueMeber来表示



我尝试过:



Gridview中的多行文字:

winforms - C#:DataGridView控件中的多行文本 - Stack Overflow [ ^ ]



尝试在以下解决方案中设置一个列表框

但坦率地说,我可以不要这样做

单个DataGridView单元格中的多个控件 [ ^ ]

解决方案

带ListBox的DataGridView控件 [ ^ ]。

Hi Evryone

I want to have listbox in specific column cells in a dataGridview

why I'm doing that ?

because I have a xml structure which some of it's parameters have multiple values

and why I don't use multi line text for each cell instead ?
because each value has an other related value which is hidden from user and I want to use listbox valueMeber for that

What I have tried:

Multiline text in Gridview:
winforms - C#: multiline text in DataGridView control - Stack Overflow[^]

trying to have a listbox in the following solution
but speaking frankly , I couldn't do that
Multiple controls in a single DataGridView cell[^]

解决方案

DataGridView Control with ListBox[^].


这篇关于如何在datagridview单元格中有一个列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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