如何在Win应用程序的datagridview中创建自定义控件列 [英] how to create custom control column in datagridview in win application

查看:84
本文介绍了如何在Win应用程序的datagridview中创建自定义控件列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为datagridview(如combobox)创建自定义对话框,但是它显示showview而不是list,当我们选择任何行时,请在combobox文本中设置文本的第一个coloumn值.
请帮帮我.

[来自WW]
哇...很难读.让我看看我是否无法改写.

您要为DataGridView创建一个自定义列.您希望该列在单击时具有显示GridView而不是列表的下拉列表.

当然,这是:然后当我们选择任何行然后在组合框文本中设置文本的第一个coloumn值.",我不知道您要说什么.

i want to create custom coloumn for datagridview like combobox but its show gridview instead of list and when we select any row then set the text first coloumn value of row in combobox text.
please help me.

[From WW]
wow...that''s difficult to read. Let me see if I can''t rephrase.

You want to create a custom column for the DataGridView. You want that column, when clicked, to have a dropdown that shows a GridView instead of a list.

Of course this: "and when we select any row then set the text first coloumn value of row in combobox text.", I have no idea what you''re trying to say.

推荐答案

您好,

您可以使用"DataGridViewComboBoxColumn"类来实现此目的.请点击以下链接获取更多参考和示例代码,

http://msdn.microsoft.com/en-us/library/system. windows.forms.datagridviewcomboboxcolumn.aspx [ ^ ]
Hi,

You can use "DataGridViewComboBoxColumn" class to achieve this. Please follow the following link for more reference and example code,

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx[^]


如果要为datagridview创建自定义列类型,那么这里有很多文章.

请参阅此处: google搜索 [
If you want to create a custom column type for a datagridview, there are a lot of articles out there.

See here: google search[^]

It''s not something that we can answer in a quick question though. You''ll need to do some reading.


这篇关于如何在Win应用程序的datagridview中创建自定义控件列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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