Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SIMPLE ? - Make Column Visible In Gridview

Reply
Thread Tools

SIMPLE ? - Make Column Visible In Gridview

 
 
Phillip Vong
Guest
Posts: n/a
 
      06-07-2006
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


 
Reply With Quote
 
 
 
 
PeterKellner
Guest
Posts: n/a
 
      06-07-2006
On 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
 
Reply With Quote
 
 
 
 
Phillip Vong
Guest
Posts: n/a
 
      06-07-2006
That's Perfect! Thanks!

Phil


"PeterKellner" <> wrote in message
news:...
> On 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide textbox / Make textbox not visible (NOT USING visible property) Jurjen de Groot ASP .Net Web Controls 0 05-19-2008 09:50 AM
gridview column values to another page via gridview hyperlink column Keith G Hicks ASP .Net 3 02-18-2008 06:17 AM
How to hide a GridView column when the column's Visible property does not support databinding? Keithb ASP .Net 2 10-27-2006 05:02 AM
How to make a hyperlink Visible or not visible in DataList Patrick Olurotimi Ige ASP .Net 7 06-15-2005 12:01 PM
Panel.Visible = True also make child controls visible. spamfurnace ASP .Net 1 05-24-2004 03:07 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57