Click here to Skip to main content
15,914,642 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to get the cell values of nested data grid using java script. Can any one give me the suggestion.
Posted

1 solution

You can try this:
1. Put a checkbox.
2. On clicking of checkbox below JQuery code will give you the cell value:
C#
$(ctrl).parents('tr').children().filter(function(index) {
                return index == 1;
            }).html()


Note: I've considered that the required cell is imediately after the checkbox (hence index = 1). Also you can use any control in place of checkbox.
 
Share this answer
 
v2
Comments
JaganKKK 3-Jun-11 8:00am    
hi, I have a datagrid inside a datagrid. i need to get the inner data grid rows.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900