Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Hiding/Displaying... Columns....

Reply
Thread Tools

Hiding/Displaying... Columns....

 
 
Brown Smith
Guest
Posts: n/a
 
      06-22-2005
How to hide/display the datagrid colums at run time?
..Net 1.1.
Thanks,
Smith


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-23-2005
Depends on whether:
1. the columns are autogenerated or no.
2. you want the hidden cells content to be available on client side or no.
3. you want the hidden cells content to be available on server-side after
postback or no.

Eliyahu

"Brown Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How to hide/display the datagrid colums at run time?
> .Net 1.1.
> Thanks,
> Smith
>
>



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-23-2005
This is a good solution if:

1. the columns are not autogenerated.
and
2. you don't want the hidden cells content to be available on client side.
and
3. you don't want the hidden cells content to be available on server-side
after postback.

Otherwise it won't work

Eliyahu

"sheidt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> dgDataGridName.Columns[0].Visible = false;
>
> This will hide the first column at runtime when placed in some
> code-behind logic. Replace the '0' with whatever the column number is
> for the column that you want to hide. Then, just set the same attribute
> to true when you want to show it.
>
>
> --
> sheidt
> ------------------------------------------------------------------------
> sheidt's Profile: http://www.highdots.com/forums/member.php?userid=323
> View this thread: http://www.highdots.com/forums/showthread.php?t=1543689
>



 
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




Advertisments