client retrieval from GridView cell values that are in an UpdatePa

Discussion in 'ASP .Net Web Controls' started by thoward, Aug 31, 2007.

  1. thoward

    thoward Guest

    I am working with ASP.NET 2.0 c# and Ajax control (UpdatePanel). The
    GridView Control is nested within an updatePanel Control which is populated
    using the partial post-back method. I am needing to extract the GridView
    Cell values from items that are selected and post them into another table all
    on the client side.

    The issue that I have is that I cannot access the GridView Control through
    the client-side as I normally would
    (document.GetElementById('GridView1').rows[0].cells[0].innerText)

    The value that is returned for the basic control value of
    (document.GetElementById('GridView1')) = NULL!

    Is it the UpdatePanel that makes this method of Data Retrieval break? How
    do I get around this?

    Thank you in advance for your Help.

    TH
    --
    ....and that was the rest of the story!!
    thoward, Aug 31, 2007
    #1
    1. Advertising

  2. thoward

    Teemu Keiski Guest

    Hi,

    you'd use document.getElementById('...')

    It is case-sensitive since client-scripting is done in javascript.


    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net



    "thoward" <> wrote in message
    news:...
    >I am working with ASP.NET 2.0 c# and Ajax control (UpdatePanel). The
    > GridView Control is nested within an updatePanel Control which is
    > populated
    > using the partial post-back method. I am needing to extract the GridView
    > Cell values from items that are selected and post them into another table
    > all
    > on the client side.
    >
    > The issue that I have is that I cannot access the GridView Control through
    > the client-side as I normally would
    > (document.GetElementById('GridView1').rows[0].cells[0].innerText)
    >
    > The value that is returned for the basic control value of
    > (document.GetElementById('GridView1')) = NULL!
    >
    > Is it the UpdatePanel that makes this method of Data Retrieval break? How
    > do I get around this?
    >
    > Thank you in advance for your Help.
    >
    > TH
    > --
    > ...and that was the rest of the story!!
    Teemu Keiski, Sep 2, 2007
    #2
    1. Advertising

  3. thoward

    thoward Guest

    Re: client retrieval from GridView cell values that are in an Upda

    That is what I used in the correct syntax, unlike what I have listed in my
    original post, however ist returns a null value for the object in question.

    Are there any other suggestions? Does the partial update, of the
    UpdatePanel, effect the format of a Gridview?

    Thank you,
    TH
    --
    ....and that was the rest of the story!!


    "Teemu Keiski" wrote:

    > Hi,
    >
    > you'd use document.getElementById('...')
    >
    > It is case-sensitive since client-scripting is done in javascript.
    >
    >
    > --
    > Teemu Keiski
    > AspInsider, ASP.NET MVP
    > http://blogs.aspadvice.com/joteke
    > http://teemukeiski.net
    >
    >
    >
    > "thoward" <> wrote in message
    > news:...
    > >I am working with ASP.NET 2.0 c# and Ajax control (UpdatePanel). The
    > > GridView Control is nested within an updatePanel Control which is
    > > populated
    > > using the partial post-back method. I am needing to extract the GridView
    > > Cell values from items that are selected and post them into another table
    > > all
    > > on the client side.
    > >
    > > The issue that I have is that I cannot access the GridView Control through
    > > the client-side as I normally would
    > > (document.GetElementById('GridView1').rows[0].cells[0].innerText)
    > >
    > > The value that is returned for the basic control value of
    > > (document.GetElementById('GridView1')) = NULL!
    > >
    > > Is it the UpdatePanel that makes this method of Data Retrieval break? How
    > > do I get around this?
    > >
    > > Thank you in advance for your Help.
    > >
    > > TH
    > > --
    > > ...and that was the rest of the story!!

    >
    >
    >
    thoward, Sep 4, 2007
    #3
  4. thoward

    thoward Guest

    Re: client retrieval from GridView cell values that are in an Upda

    Allow me to retort...My Syntax was NOT correct and neither was my identifier.

    When using the GridView within an UpdatePanel within a TabPanel within a
    TabContainer within a TabContainer it is necessary to include all levels of
    the structure in order to drill down to the GridView Table.

    such as this:

    alert(document.getElementById('TabContainer1_ItemToWorkTabPanel_ctl01_TabContainer2_panSearchItems_ctl01_gvItemSearch').rows[2].cells[2].innerText);

    Thank you Teemu for pointing me back to the start!
    --
    ....and that was the rest of the story!!


    "Teemu Keiski" wrote:

    > Hi,
    >
    > you'd use document.getElementById('...')
    >
    > It is case-sensitive since client-scripting is done in javascript.
    >
    >
    > --
    > Teemu Keiski
    > AspInsider, ASP.NET MVP
    > http://blogs.aspadvice.com/joteke
    > http://teemukeiski.net
    >
    >
    >
    > "thoward" <> wrote in message
    > news:...
    > >I am working with ASP.NET 2.0 c# and Ajax control (UpdatePanel). The
    > > GridView Control is nested within an updatePanel Control which is
    > > populated
    > > using the partial post-back method. I am needing to extract the GridView
    > > Cell values from items that are selected and post them into another table
    > > all
    > > on the client side.
    > >
    > > The issue that I have is that I cannot access the GridView Control through
    > > the client-side as I normally would
    > > (document.GetElementById('GridView1').rows[0].cells[0].innerText)
    > >
    > > The value that is returned for the basic control value of
    > > (document.GetElementById('GridView1')) = NULL!
    > >
    > > Is it the UpdatePanel that makes this method of Data Retrieval break? How
    > > do I get around this?
    > >
    > > Thank you in advance for your Help.
    > >
    > > TH
    > > --
    > > ...and that was the rest of the story!!

    >
    >
    >
    thoward, Sep 4, 2007
    #4
    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. Richard Dixson
    Replies:
    1
    Views:
    495
    Joe Fallon
    May 18, 2004
  2. Replies:
    1
    Views:
    367
    Grant Merwitz
    Sep 19, 2005
  3. Guest
    Replies:
    1
    Views:
    343
    Matt H
    Apr 14, 2006
  4. RGF
    Replies:
    1
    Views:
    379
  5. Jah_Alarm

    Retrieval of widget property values

    Jah_Alarm, Oct 27, 2010, in forum: Python
    Replies:
    3
    Views:
    445
    Peter Otten
    Oct 28, 2010
Loading...

Share This Page