在网格的组合框中添加项目 [英] Adding items in a combobox in a grid

查看:66
本文介绍了在网格的组合框中添加项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在datagrid中有一个组合框.
我需要在运行时将项目添加到组合框中.

hi to all,

i have a combobox in a datagrid..

i need to add items to the combobox at run time

推荐答案

这是WinForms,对吗?

除了查看数据绑定外,您还可以查看DataGridView的VirtualMode属性.这使事情变得更加复杂,因为该控件现在需要设置新行,填充值等时会触发几个不同的事件.好处是,您拥有处理这些事件时将获得的所有控制权.

我建议您在MSDN中搜索DataGridViews和虚拟模式.也许这里甚至还有一篇文章.
This is WinForms, right?

Instead of data binding you might then take a look at the VirtualMode property of the DataGridView. This makes things a bit more complicated, as the control now fires several different events whenever it needs to set up a new row, fill in values and the like. The upside is, that you have all the control you will ever get when processing those events.

I suggest you search the MSDN for DataGridViews and the virtual mode. Or perhaps there even is an article here.


这篇关于在网格的组合框中添加项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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