我想在运行时更改datagridview中的列名 [英] i wanna change column name in datagridview at run time

查看:85
本文介绍了我想在运行时更改datagridview中的列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi frieds!



i使用datagridview显示数据库列名的数据库的所有数据。

i想要更改该列运行时的名字

怎么样? plz帮我

hi frieds!

i took datagridview which shows all the data of my database with databaase column name.
i want to change that column name at run time
how? plz help me

推荐答案

试试

try
datagridview.HeaderText="Name";//Replace name with anything you want to display on the datagridview column


DataGridView有一个列名属性,该属性设置为底层集合fielname,但是可以在将数据绑定到DGV(此时DGV有要操作的列。)
DataGridView has a column name attribute which is set to the underlying collections fielname but can be changed after you bind the data to the DGV (at which point the DGV has columns to manipulate.)


参考这些将帮助你

http://forums.asp.net/t/1794771.aspx [ ^ ]



需要在运行时动态更改gridview的列名 [ ^ ]
Refer these which will help you
http://forums.asp.net/t/1794771.aspx[^]

Required to change the column name of gridview dynamically at runtime[^]


这篇关于我想在运行时更改datagridview中的列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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