How to reference hidden columns

Discussion in 'ASP .Net Datagrid Control' started by David L, May 28, 2004.

  1. David L

    David L Guest

    I'm trying to reference a hidden key column in my datagrid control without
    success. I've set the columns up at design time through the property
    builder, and I've set my key column's visible property to false. In my
    updatecommand event I need to reference the key value for the update but I
    can't get anything but an empty string when I reference
    e.items.cells(1).text

    Thanks in advance
    David L, May 28, 2004
    #1
    1. Advertising

  2. David L

    Rick Spiewak Guest

    If a column's visible property is set to false, it doesn't render, and won't
    participate in viewstate or postback. Get the key value from the dataset or
    datatable instead.

    "David L" <> wrote in message
    news:...
    > I'm trying to reference a hidden key column in my datagrid control without
    > success. I've set the columns up at design time through the property
    > builder, and I've set my key column's visible property to false. In my
    > updatecommand event I need to reference the key value for the update but I
    > can't get anything but an empty string when I reference
    > e.items.cells(1).text
    >
    > Thanks in advance
    >
    >
    Rick Spiewak, May 28, 2004
    #2
    1. Advertising

  3. You can get the hidden column value even on client side if you hide the
    column with attribute display:none in a stylesheet.

    Eliyahu

    "Rick Spiewak" <> wrote in message
    news:...
    > If a column's visible property is set to false, it doesn't render, and

    won't
    > participate in viewstate or postback. Get the key value from the dataset

    or
    > datatable instead.
    >
    > "David L" <> wrote in message
    > news:...
    > > I'm trying to reference a hidden key column in my datagrid control

    without
    > > success. I've set the columns up at design time through the property
    > > builder, and I've set my key column's visible property to false. In my
    > > updatecommand event I need to reference the key value for the update but

    I
    > > can't get anything but an empty string when I reference
    > > e.items.cells(1).text
    > >
    > > Thanks in advance
    > >
    > >

    >
    >
    Eliyahu Goldin, May 30, 2004
    #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. Mark Rae

    GridView controls and hidden columns

    Mark Rae, May 14, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,378
    Mark Rae
    May 14, 2006
  2. Steven Nagy

    GridView ObjectDataSource hidden columns

    Steven Nagy, Feb 7, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    618
    Steven Nagy
    Feb 8, 2007
  3. MP

    GridVIew columns (hidden)

    MP, Feb 15, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    440
    Eliyahu Goldin
    Feb 15, 2007
  4. Rick
    Replies:
    3
    Views:
    8,104
    Alexey Smirnov
    Apr 13, 2010
  5. SolarCanine
    Replies:
    2
    Views:
    254
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page