Hiding/Displaying... Columns....

Discussion in 'ASP .Net Datagrid Control' started by Brown Smith, Jun 23, 2005.

  1. Brown Smith

    Brown Smith Guest

    How to hide/display the datagrid colums at run time?
    ..Net 1.1.
    Thanks,
    Smith
     
    Brown Smith, Jun 23, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > How to hide/display the datagrid colums at run time?
    > .Net 1.1.
    > Thanks,
    > Smith
    >
    >
     
    Eliyahu Goldin, Jun 23, 2005
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    >
    > 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
    >
     
    Eliyahu Goldin, Jun 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amber
    Replies:
    1
    Views:
    634
    Alvin Bruney
    Oct 11, 2003
  2. =?Utf-8?B?a2x5bm4=?=

    hiding columns in datagrid not working

    =?Utf-8?B?a2x5bm4=?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    382
    =?Utf-8?B?a2x5bm4=?=
    Oct 8, 2004
  3. tshad
    Replies:
    9
    Views:
    3,335
    tshad
    Apr 5, 2005
  4. ton
    Replies:
    2
    Views:
    211
    Alvin Bruney [MVP]
    Feb 11, 2004
  5. Ste
    Replies:
    41
    Views:
    835
    Thomas 'PointedEars' Lahn
    Aug 1, 2007
Loading...

Share This Page