如何添加两个按钮到一个DataGrid列动态? [英] How can i add two buttons to a single datagrid column dynamically?

查看:130
本文介绍了如何添加两个按钮到一个DataGrid列动态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按钮code

DataGridViewButtonColumn btn = new DataGridViewButtonColumn();  
dataGridView1.Columns.Add(btn);  

我使用的WinForms应用程序,在这里就这样我添加两个按钮,但我希​​望这两个按钮应该是发生在一列只。

I'm using WinForms App, here this way I add two buttons, but I want these two button should be place in single column only.

推荐答案

您必须创建一个自定义的列。看看 rel="nofollow">和的此处一些例子。

You have to create a custom column. Look at here and here for some examples.

这篇关于如何添加两个按钮到一个DataGrid列动态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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