Wednesday, March 28, 2012

SIMPLE ? - Make Column Visible In Gridview

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!
PhilOn Tue, 6 Jun 2006 22:40:30 -0400, "Phillip Vong"
<phillip_vong*at*yahoo*dot*com> wrote:

>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
That's Perfect! Thanks!
Phil
"PeterKellner" <pkellnernews@.73rdstreet.com> wrote in message
news:50gc82pqvboeufjh2c8eipcgpn8fq8ian2@.
4ax.com...
> On Tue, 6 Jun 2006 22:40:30 -0400, "Phillip Vong"
> <phillip_vong*at*yahoo*dot*com> wrote:
>
> 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

0 comments:

Post a Comment