SOLVED:[help]Jqgrid master detail list in another page!

#1
[eluser]cestaz18[/eluser]
i have master detail table list in another page...

the problem is i can't show the data output inside the table...

help please...

here's my code

VIEW

Code:
<div class="content">
            <div class="dpane">
            <table id="listFlex" class="listFlex" cellpadding="0" cellspacing="0"></table>
            <div id="pager" class="scroll" style="text-align: center;"></div>
            </div>
    </div>


.....

  <div class="dpane">
        <table id="detFlex1" class="detFlex"></table>
    <div id="pager2" class="scroll" style="text-align: center;"></div>                      
                    </div>


SCRIPT


Code:
$(".listFlex").jqGrid({
         url: root + mod + '/listview',
          editurl: root + mod + '/post',        
          sortable: true,
         datatype: "json",
         mtype: 'POST',
         colNames:['','Username','Lastname', 'Firstname','Middle Initial'],
         colModel:[
                       {name:'user_id', index: 'item', hidden: true},
                      {name:'username',index:'username', width:80, align:"left", editable:true},
                    {name:'last_name', index: 'last_name', width:80, editable: true},
                       {name:'first_name',index:'first_name', width:100,align:"left",editable:true},
                    {name:'middle_initial', index: 'middle_initial', width:80, editable: true}
                    
               ],
         rowNum:10,
         rowList:[10,20,30],
         rownumbers: true,
         pager: '#pager',
         sortname: 'username',
         viewrecords: true,
         sortorder: 'asc',
         autowidth: true,
                  ondblClickRow: function (celDiv,id)
                        {
                            //alert (id);
                            $(celDiv).addClass("pointer");
                            $(celDiv).click(function(){
                                $('.toolbar a[title=Header]').trigger('click');                
                                viewdb(id);        
                            });
                        },
         height: "200",
         caption:"User Role List -Dean",
onSelectRow: function(rowid, selected)
            {
                if(rowid != null) {
                    //jQuery("#detFlex1").jqGrid('setGridParam',{postData:{user_id:rowid}});
                     jQuery("#detFlex1").setGridParam({url: root + mod + '/detaillistview',page:1})
                     .setCaption("Detail: "+rowid)
                    jQuery("#detFlex1").trigger("reloadGrid");
                    $('.toolbar a[title=Header]').trigger('click');                
                    viewdb(rowid);        
                    //viewHeader(rowid, selected);
                }
            }
            
            
        
            
});


$("#detFlex1").jqGrid({
         url: root + mod + '/detaillistview',
         datatype: "json",
         mtype: 'POST',
         colNames:['','Company Code','Company Name', ''],
         colModel:[
                   {name:'company_access_id', index: 'company_access_id', hidden: true},
                      {name:'company_code',index:'company_code', width:200, align:"left", editable:true},
                    {name:'company_name', index: 'company_name', width:250, editable: true},
                   {name:'company_id',index:'company_id', hidden: true}
               ],
         rowNum:10,
         rowList:[10,20,30],
         rownumbers: true,
         pager: '#pager2',
         sortname: 'company_code',
         viewrecords: true,
         sortorder: 'asc',
         autowidth: true,
         height: "100",
         caption:"Details"

});


Messages In This Thread
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 01-28-2010, 01:59 AM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 01-28-2010, 02:03 AM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 01-28-2010, 02:04 AM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 02-01-2010, 11:49 PM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 02-01-2010, 11:52 PM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 02-01-2010, 11:53 PM
SOLVED:[help]Jqgrid master detail list in another page! - by El Forum - 02-01-2010, 11:54 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.