Hide GridView Columns

Discussion in 'ASP .Net' started by David C, Feb 29, 2008.

  1. David C

    David C Guest

    I have a GridView that I am exporting to Excel and it works fine. However,
    the 1st and last columns have Edit and Delete command links and I do not
    want to export them. Is there a way to do this before I render it? Thanks.

    David
     
    David C, Feb 29, 2008
    #1
    1. Advertising

  2. David C

    David C Guest

    Duh...I found the answer, I added gv.Columns(x).Visible = False

    David
    "David C" <> wrote in message
    news:...
    >I have a GridView that I am exporting to Excel and it works fine. However,
    >the 1st and last columns have Edit and Delete command links and I do not
    >want to export them. Is there a way to do this before I render it?
    >Thanks.
    >
    > David
    >
     
    David C, Feb 29, 2008
    #2
    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. Jason
    Replies:
    3
    Views:
    17,082
    Jan Hyde
    May 8, 2006
  2. =?Utf-8?B?Q1NoYXJwZ3V5?=

    hide columns in export of gridview

    =?Utf-8?B?Q1NoYXJwZ3V5?=, Sep 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    489
    =?Utf-8?B?Q1NoYXJwZ3V5?=
    Sep 7, 2006
  3. Phil Sandler

    Hide Columns in GridView?

    Phil Sandler, Dec 21, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    899
    Eliyahu Goldin
    Dec 22, 2006
  4. =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?=

    Hide a few (variable) columns in a GridView

    =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?=, Feb 13, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    830
    Alexey Smirnov
    Feb 15, 2007
  5. DavidC

    Hide columns in GridView

    DavidC, Feb 3, 2010, in forum: ASP .Net
    Replies:
    1
    Views:
    2,573
    PvdG42
    Feb 3, 2010
Loading...

Share This Page