473,323 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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!

Phil
Jun 7 '06 #1
2 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
Jun 7 '06 #2
That's Perfect! Thanks!

Phil
"PeterKellner" <pk**********@73rdstreet.com> wrote in message
news:50********************************@4ax.com...
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

Jun 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Hans Merkl | last post by:
Hi, Is there a way to show the column headers of a GridView control even if there is no data? The only thing I see is the EmptyDataTemplate but I would also like to display the column headers. ...
3
by: Nick | last post by:
HI ALL: I have a gridview and display 4 columns , one of the column is ID , which i don't wanna to visible. The problem i got is that the update , insert and delet function doesn't work if i...
2
by: Keithb | last post by:
I need to hide a GridView's "edit" column if the user's role does not support editing. However, the column's Visible property does not support databinding. Is there a workaround? Thanks, ...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
4
by: =?Utf-8?B?QmFidU1hbg==?= | last post by:
Hi, I have a GridView and a SqlDataSource controls on a page. The SqlDataSource object uses stored procedures to do the CRUD operations. The DataSource has three columns one of which -...
0
by: landesjoe | last post by:
Hi, here's my problem in short: Text boxes in gridview don't seem to hold their value if the column's .Visible property is changed back and forth. I've got a form with a gridview populated from...
2
by: L.Peter | last post by:
Hi Group, I have a gridview bound to a sqldatasource, this datasource pulls data out from select and update procedures with 10 update parameters the gridview has 15 columns, in edit mode, I want...
5
by: bbawa1 | last post by:
I have a GetData methd which is returning a table using
4
by: Luqman | last post by:
I have populated the Child Accounts and Parent Accounts in a Grid View Control, I want to hide the Select Column of Parent Accounts, but not the Child Accounts, is it possible ? I am using VS...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.