Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   hide a column programatically (http://www.velocityreviews.com/forums/t762717-hide-a-column-programatically.html)

Bruno Alexandre 04-25-2006 07:24 AM

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)



Manikandan 05-02-2006 05:55 AM

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.


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