Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > client retrieval from GridView cell values that are in an UpdatePa

Reply
Thread Tools

client retrieval from GridView cell values that are in an UpdatePa

 
 
thoward
Guest
Posts: n/a
 
      08-31-2007
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!!
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      09-02-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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!!



 
Reply With Quote
 
 
 
 
thoward
Guest
Posts: n/a
 
      09-04-2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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!!

>
>
>

 
Reply With Quote
 
thoward
Guest
Posts: n/a
 
      09-04-2007
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_ItemT oWorkTabPanel_ctl01_TabContainer2_panSearchItems_c tl01_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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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!!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Retrieval of widget property values Jah_Alarm Python 3 10-28-2010 09:19 AM
Gridview and SelectCommand data retrieval... RGF ASP .Net 1 05-12-2007 04:32 PM
News-retrieval client-news.google Python 1 04-14-2006 09:58 PM
Regarding retrieval of IP Address of the Client lingammca@gmail.com ASP .Net 1 09-19-2005 09:18 AM



Advertisments