Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have tried the following code but it does not work.

C#
GridView1.DataSource = SearchReader;
GridView1.DataBind();
GridView1.Columns[0].Visible = false;
Posted
Updated 26-Apr-10 17:54pm
v2

Add the last line

GridView1.Columns[0].Visible = false;

in GridView RowDataBound Event, it should work or you can add style "visibility:none" for that column in the same event.
 
Share this answer
 
You could set it's width to zero perhaps ? Or create a template for the control which doesn't show the data in that column, if you need it there, but not shown.
 
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