将datagridview显示为组合框下拉列表 [英] display datagridview as combobox dropdown

查看:122
本文介绍了将datagridview显示为组合框下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想将datagridview显示为combobox下拉列表,将datagridview显示为evry操作,如下拉列表,即鼠标操作,按键....





请帮帮我......

Hi,

I want to show the datagridview as combobox dropdown and datagridview with evry action like dropdown i.e mouse action , key press ....


please help me ......

推荐答案

我想你'我需要自己建立控制。这并不难......我会在你的表单中添加一个datagridview控件并隐藏它。然后,我会添加一个文本框,我想要组合框,并在它旁边的一个小按钮作为下拉按钮。当有人点击下拉按钮时,移动文本框下的数据网格视图,将其大小调整为文本框的长度,并使其可见。如果有人点击表单上的任何其他内容,请将datagridview设置为visible = false。
I think you''ll need to build that control yourself. It''s not that hard... I would add a datagridview control to your form and hide it. Then, I would add a text box where I wanted the combobox to be, and a small button next to it to serve as the drop down button. When someone clicks on the dropdown button, move your data grid view under the textbox, size it to the length of the textbox, and make it visible. If someone clicks anything else on the form, set the datagridview visible = false.


这篇关于将datagridview显示为组合框下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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