client retrieval from GridView cell values that are in an UpdatePa

T

thoward

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
 
T

Teemu Keiski

Hi,

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

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

thoward

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 said:
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 said:
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
 
T

thoward

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 said:
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 said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top