本文介绍了将DataGridViewComboBoxColumn添加到DataGridView Windows Forms Vb.net中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经能够在我的vb.net windows窗体程序中将单个datagridview单元格更改为组合框。现在我希望找到一种方法将整个列更改为组合框。这是我的代码将单个datagridview单元格更改为组合框,相同的方法应该工作,但我还没弄明白如何。非常感谢您提供的任何帮助或建议。 :)
Dim myComboBoxCell As New DataGridViewComboBoxCell
myComboBoxCell.Items.Add(A)
myComboBoxCell.Items .Add(B)
myComboBoxCell.Items.Add(C)
DataGridView1(3,0)= myComboBoxCell
解决方案
I've been able to change an individual datagridview cell to a combobox in my vb.net windows forms program. Now I'm hoping to find a way to change the entire column to a combobox. Here is my code to change the individual datagridview cells to combobox, the same approach should work but I haven't figured out how. I greatly appreciate any help or advice you may offer. :)
Dim myComboBoxCell As New DataGridViewComboBoxCell myComboBoxCell.Items.Add("A") myComboBoxCell.Items.Add("B") myComboBoxCell.Items.Add("C") DataGridView1(3, 0) = myComboBoxCell
解决方案
这篇关于将DataGridViewComboBoxColumn添加到DataGridView Windows Forms Vb.net中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!