![]() |
hide a column programatically
Hi guys,
How can I HIDE a GridView Column programatically? I have a column that has the prices, but I only want the user view the prices if they enter the correct password, at this time I have 2 gridviews I use the visible property to change between them... but can I do this having just one gridview and hide the column like GridView1.ColumnHeaderName.visible = False ? -- Thank you in Advance. Bruno Alexandre (a Portuguese in Denmark) |
Re: hide a column programatically
Hi Bruno ! Hope this code will help you resolve the issue you access the specific column and set it visible property to false , like this DataGridView.Columns["ColumnName"].Visible = false; "Bruno Alexandre" <bruno.pub@filtrarte.com> wrote in message news:OpXLjlDaGHA.4612@TK2MSFTNGP03.phx.gbl... > Hi guys, > > How can I HIDE a GridView Column programatically? > > I have a column that has the prices, but I only want the user view the > prices if they enter the correct password, at this time I have 2 gridviews > I use the visible property to change between them... > > but can I do this having just one gridview and hide the column like > GridView1.ColumnHeaderName.visible = False ? > > -- > > > Thank you in Advance. > > Bruno Alexandre > (a Portuguese in Denmark) > > |
| All times are GMT. The time now is 05:36 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.