如何在windowsform中的datagrid视图中构建一个组合框 [英] how can i bulid a combo box in datagrid view in windowsform

查看:57
本文介绍了如何在windowsform中的datagrid视图中构建一个组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网格中构建一个组合框,但我不能。

请帮我提供示例

i want to bulid a combobox in grid but i am not able.
pls help me with sample

推荐答案

嗨.. ..你可以使用解决方案....它会帮助你





Dim colCombo As New DataGridViewComboBoxColumn



colCombo.DropDownWidth = 325

colCombo.Name =Combo

''colCombo.DataSource = dt



虽然xCount< dt.Rows.Count



colCombo.Items.Add(dt.Rows(xCount)(0).ToString)



xCount + = 1

结束时



dgvPay.Columns.Add(colCombo)
hi....you can use the solution....it will help you


Dim colCombo As New DataGridViewComboBoxColumn

colCombo.DropDownWidth = 325
colCombo.Name = "Combo"
''colCombo.DataSource = dt

While xCount < dt.Rows.Count

colCombo.Items.Add(dt.Rows(xCount)(0).ToString)

xCount += 1
End While

dgvPay.Columns.Add(colCombo)


这篇关于如何在windowsform中的datagrid视图中构建一个组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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