SIMPLE ? - Make Column Visible In Gridview

P

Phillip Vong

Sorry about this simple question.

I'm running ASP.NET 2.0 using VS2005.

I have a simple Gridview. I have a column named "WhoUpdate" with visible =
False.
<asp:BoundField DataField="WhoUpdate" HeaderText="WhoUpdate"
SortExpression="WhoUpdate" Visible="False" />


I have a simple Button outside of the gridview. I just want to make it so
when someone clicks this button, the WhoUpdate column will be visible =
True.

Thanks!

Phil
 
P

PeterKellner

Sorry about this simple question.

I'm running ASP.NET 2.0 using VS2005.

I have a simple Gridview. I have a column named "WhoUpdate" with visible =
False.
<asp:BoundField DataField="WhoUpdate" HeaderText="WhoUpdate"
SortExpression="WhoUpdate" Visible="False" />


I have a simple Button outside of the gridview. I just want to make it so
when someone clicks this button, the WhoUpdate column will be visible =
True.

Thanks!

Phil

how about this: (the 2 is the third column)

protected void Button1_Click(object sender, EventArgs e)
{
GridView1.Columns[2].Visible = false;
}
Peter Kellner
http://peterkellner.net
 
P

Phillip Vong

That's Perfect! Thanks!

Phil


PeterKellner said:
Sorry about this simple question.

I'm running ASP.NET 2.0 using VS2005.

I have a simple Gridview. I have a column named "WhoUpdate" with visible
=
False.
<asp:BoundField DataField="WhoUpdate" HeaderText="WhoUpdate"
SortExpression="WhoUpdate" Visible="False" />


I have a simple Button outside of the gridview. I just want to make it so
when someone clicks this button, the WhoUpdate column will be visible =
True.

Thanks!

Phil

how about this: (the 2 is the third column)

protected void Button1_Click(object sender, EventArgs e)
{
GridView1.Columns[2].Visible = false;
}
Peter Kellner
http://peterkellner.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top