在运行时动态更改单元格类型以获取datagridview [英] Dynamically change the cell type at run for a datagridview

查看:60
本文介绍了在运行时动态更改单元格类型以获取datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在windoes应用程序中,如何在运行时将datagridview列类型从复选框更改为文本框?
请帮助..

In windoes application how do i change my datagridview column type from checkbox to textbox at run time?
Pls help..

推荐答案

尝试一下..

try this..

Datagridview1.Columns.RemoveAt(index);
Datagridview1.Columns.Insert(index,new DataGridViewTextBoxColumn());



然后重新绑定DataGridView

希望对您有所帮助.



then re-bind the DataGridView

Hope this helps..


这篇关于在运行时动态更改单元格类型以获取datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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