Loading ...

find corresponding row data using Jquery

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  client side web development   » find corresponding row data using Jquery

find corresponding row data using Jquery

Posts under the topic: find corresponding row data using Jquery

Posted: 3/2/2011

Lurker 10  points  Lurker
  • Joined on: 3/2/2011
  • Posts: 2

hi all,

i designed a gridview and innergridview. design seems below

Master Data

 

 

         Detail Data

Master Data

 

 

i have some hidden control in the master record, in child row when i click an link button then i want to read that hdden value so, i use below code

var data1 = closestTR.find('input:hidden[id$=hdnData1]').val();

but its not working , the same code is working with the event from Master Record.

 

may i know how to read that master row record from the child row.?

 

for this master and child row concepts i used below syntax

 

 

 

<gridview>

          <HeaderTemplate>

                   <table>

                             <tr><td>This is for Master Row Header</td></tr>

                   </table>

 

            </HeaderTemplate>

         

          <ItemTemplate>

                             <table>

                             <tr><td>This is for Master Row Data</td></tr>

                   </table>

</ItemTemplate>

 

 

          <innerGridview>

                   <HeaderTemplate>

                   <table>

                             <tr><td>This is for Detail Row Heading</td></tr>

                   </table>

 

</HeaderTemplate>

 

<ItemTemplate>

                             <table>

                             <tr><td>This is for Master Row Data</td></tr>

                   </table>

</ItemTemplate>

 

 

          </innerGridview>

 

 

<gridview> 


Posted: 3/2/2011

Guru 16773  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

Hi,

Can you show your JavsScript code? it will be helpful for us to help you after seeing your code.


Posted: 3/3/2011

Lurker 10  points  Lurker
  • Joined on: 3/2/2011
  • Posts: 2

Raghav this is my code

i tried this code

var closestTR = $(this).closest('tr');

 var dc = closestTR.find('input:hidden[id$=hdnData1]').val();

from innergridview link button click event. 


Posted: 3/4/2011

Guru 16773  points  Guru
  • Joined on: 4/19/2009
  • Posts: 490

Hi,

This is not the complete code , I need to look what is this thats why I was saying to show me the detailed JavaScript code.


Posted: 6/16/2011

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391

What's going on with the issue in this thread?


Page 1 of 1 (5 items)