hidden datagrid columns

Discussion in 'ASP .Net Datagrid Control' started by KJ, Aug 19, 2004.

  1. KJ

    KJ Guest

    I have a hidden template column and when I try to access it through
    javascript(document.all[id of DIV in column]) it cannot find it. Is
    this normal or am I doing something wrong?
    KJ, Aug 19, 2004
    #1
    1. Advertising

  2. KJ

    Jos Guest

    KJ wrote:
    > I have a hidden template column and when I try to access it through
    > javascript(document.all[id of DIV in column]) it cannot find it. Is
    > this normal or am I doing something wrong?


    This is normal.
    Since the column is hidden, it is not rendered on the client, and JS can not
    find it.
    Its values are still there, in viewstate (if not turned off), but that's
    something JS can not access.

    --

    Jos
    Jos, Aug 21, 2004
    #2
    1. Advertising

  3. If you need to access the values on the client, you should hide the column
    with stylesheet rule display:none applied to both ItemStyle and HeaderStyle.

    Eliyahu

    "Jos" <> wrote in message
    news:%...
    > KJ wrote:
    > > I have a hidden template column and when I try to access it through
    > > javascript(document.all[id of DIV in column]) it cannot find it. Is
    > > this normal or am I doing something wrong?

    >
    > This is normal.
    > Since the column is hidden, it is not rendered on the client, and JS can

    not
    > find it.
    > Its values are still there, in viewstate (if not turned off), but that's
    > something JS can not access.
    >
    > --
    >
    > Jos
    >
    >
    Eliyahu Goldin, Aug 22, 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. Rick
    Replies:
    3
    Views:
    8,105
    Alexey Smirnov
    Apr 13, 2010
  3. rob thomson
    Replies:
    0
    Views:
    254
    rob thomson
    Sep 4, 2003
  4. ton
    Replies:
    2
    Views:
    201
    Alvin Bruney [MVP]
    Feb 11, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    254
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page