ASP.NET:在GridView的隐藏列 [英] ASP.NET : Hiding columns in gridview
本文介绍了ASP.NET:在GridView的隐藏列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法,我可以控制从code列。
Is there a way I can control columns from code.
我有一滴一滴框选择:日常和周末和周一,周二,周三,周四,周五,周六,周日在GridView列。 如果用户选择我每天想显示仅在周一列到周五。
I had a drop drop box with select : Daily and weekend and the gridview column with Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,sunday. If the user selects Daily i want to show columns only from Monday to Friday.
有可能从code来控制。哦,我用这griview在我的网页,并在完成编码使用C#。
It is possible to control from the code. Oh i am using this griview in my webpage and coding in done using C#.
帮助!
推荐答案
使用<一个href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.columns.aspx">Columns属性:
GridView1.Columns[5].Visible = false
GridView1.Columns[6].Visible = false
这篇关于ASP.NET:在GridView的隐藏列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文