在gridview中添加/隐藏列. [英] adding/hiding columun in a gridview.

查看:160
本文介绍了在gridview中添加/隐藏列.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我一直在想是否可以在gridview中隐藏列?

例如.

我有4列.那么那四列等于一组.

我有可能隐藏第4列吗?

我希望你能帮助我.

谢谢.

-chaosgray-

hello guys.

im been thinking if there is a way of hiding a column in a gridview?

for example.

i have 4 column. then that 4 column is equal to one group.

is there a possibility that i can hide the 4 column?

i hope you can help me.

thanks.

-chaosgray-

推荐答案

就像Cuteband在上面的评论中所说,代码就像
Well as Cuteband said in the comment above, the code is like
GridView.Columns[2].Visible = false;



以下是您希望看到的一些教程链接:

http://csharpdotnetfreak.blogspot.com/2008/12/hide- gridview-columns-in-normal-mode.html [ ^ ]

在ASP.NET中显示/隐藏GridView列 [



Below are some tutorial links that you would love to see:

http://csharpdotnetfreak.blogspot.com/2008/12/hide-gridview-columns-in-normal-mode.html[^]

Show / Hide GridView Columns in ASP.NET[^]


Set the property ''Visible'' =false


阿米特·库马尔·蒂瓦里先生发布的任何内容绝对正确.如果您对他的回答不满意,请使用不同的方式绑定网格视图.
Hi whatever Mr. Amit kumar Tiwari posted is absolutely right. If u r not satisfied with his answer plz display ur source, bcoz there are different ways to bind the gridview.


这篇关于在gridview中添加/隐藏列.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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