如何在dataGridview单元格中有一个列表框

时间:2017-01-26 09:26:22

标签: c# winforms datagridview listbox

我想在dataGridview

中的特定列单元格中设置列表框

为什么我这样做?

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

为什么我不为每个单元格使用多行文字? 因为每个值都有一个对用户隐藏的其他相关值,我想使用listbox valueMeber

我尝试了什么:

Gridview中的多行文字:

winforms - C#: multiline text in DataGridView control - Stack Overflow

尝试在以下解决方案中使用列表框 但坦率地说,我无法做到这一点

Multiple controls in a single DataGridView cell

1 个答案:

答案 0 :(得分:-1)

工作示例: stackoverflow

是必需的效果? enter image description here