Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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-
Posted
Comments
cuteband 24-May-11 22:00pm    
set your properties to visible=false

Well as Cuteband said in the comment above, the code is like
C#
GridView.Columns[2].Visible = false;


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[^]
 
Share this answer
 
Comments
ambarishtv 25-May-11 7:47am    
my 5
Wild-Programmer 25-May-11 8:33am    
Thanks Ambarishtv
Set the property 'Visible' =false
 
Share this answer
 
Comments
ambarishtv 25-May-11 7:47am    
5
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900