tags:

views:

165

answers:

2

hello friends,

I have a jquery grid with data with user data.. I need to handle the click on grid row for each grid row when I click I need to dispaly other grid in the bottom of the grid. some thing like very similar to this..

http://www.trirand.com/blog/jqgrid/jqgrid.html

Go to Advanced ---> master details

thanks

A: 

This is how you use it

$("#tablename tr").click(function(){//do what needs to be done});

HTH

Raja
thanks raja, I did the same way but I am not geting the second grid when I want to display..
kumar
Please post your code so that I can check it.
Raja
Raja can you give me your Email i cant post the code here bec of security reasons? yes I will post all my code please help me out..
kumar
A: 

the onSelectRow is what is making the details grid load the information from the master grid.

   onSelectRow: function(ids) { 
            if(ids == null) {
                    ids=0; 
                    if(jQuery("#list10_d").jqGrid('getGridParam','records') >0 ) 
                    { 
                        jQuery("#list10_d").jqGrid('setGridParam',{url:"subgrid.php?q=1&id="+ids,page:1});
                        jQuery("#list10_d").jqGrid('setCaption',"Invoice Detail: "+ids) 
                        .trigger('reloadGrid'); 
                    }
                } else { 
                    jQuery("#list10_d").jqGrid('setGridParam',{url:"subgrid.php?q=1&id="+ids,page:1}); 
                    jQuery("#list10_d").jqGrid('setCaption',"Invoice Detail: "+ids)
                    .trigger('reloadGrid');
                } 
        }
Glennular
The thing is on first load I need to hind the second grid.. on clicking first row in master grid I need to disply the second gird by passing the id value.. I am passing the URL:/Friends/Names/shiva?id=AAA" is this right?Thanks
kumar
Yes you should use a similar URL: to the one use used to load the master grid. Also test to make sure /Friends/Names/shiva?id=AAA is actually returning data.
Glennular
NO my master grid URL is differnt and My chaild grid URL is completly differnt .. Bec on click I need to pass master grid row Id to the stored procedure to display second grid result.
kumar
that why i said it should be "similar'
Glennular
if it is similar both the result are same? i cant not get the second grid result based on first grid result.. Please correct me if I am wrong?than s
kumar
i think some code examples would be helpful.
Glennular