Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Subgrid do not list my data
01/08/2011
10:15
Avatar
djkuddel
Member
Members
Forum Posts: 25
Member Since:
01/08/2011
sp_UserOfflineSmall Offline

Hello,

I want to use subgrid with jqGrid 4.1.2, but I got no data display in the Subgrid.

I send the script the value which I need for the query, with 

 subGridModel :[{params : ['Field1']}]

Here the script I use:

$("#jqbar").jqGrid({

    url:'script1.php',
    datatype: "json",
    height: 400,
    colNames:['Field1','Field2', 'Field3'...],
    colModel:[ {name:'Field1',index:'Field1', width:75}, {name:'Field2',index:'Field2', width:75}, {name:'Field3',index:'Field3', width:75}, ...],
    rowNum:30,
    rowTotal: 2000,
    rowList : [20,30,50],
    mtype: "GET",
    rownumbers: false,
    gridview: true,
    pager: '#jqbar',
    sortname: 'Field1',
    viewrecords: true,
    sortorder: "asc",
    caption: "Grid",
    subGrid : true,
    subGridOptions: {
        "plusicon" : "ui-icon-triangle-1-e",
        "minusicon" : "ui-icon-triangle-1-s",
        "openicon" : "ui-icon-arrowreturn-1-e",
        "reloadOnExpand" : false,
        "selectOnExpand" : true
    },
    subGridModel :[{params : ['Field1']}],
    subGridRowExpanded: function(subgrid_id, row_id) {
        var subgrid_table_id, pager_id;
        subgrid_table_id = subgrid_id+"_t";
        pager_id = "p_"+subgrid_table_id;
        $("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table><div id='"+pager_id+"' class='scroll'></div>");
        $("#"+subgrid_table_id).jqGrid({
            url:"script2.php?id="+row_id,
            datatype: "xml",
            mtype: 'GET',
            colNames:['SubField1','SubField2', 'SubField3', ...],
            colModel:[ {name:'SubField1',index:'SubField1', width:75}, {name:'SubField2',index:'SubField2', width:75}, {name:'SubField3',index:'SubField3', width:75},... ],
            rowNum:20,  
            pager: pager_id,
            sortname: 'SubField1',
            sortorder: "asc",
            height: '100%',
            caption: "Subgrid"
        });
        $("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id+"' style='top:0px;",{edit:false,add:false,del:false,search:false})
    }
});

Best regards,

DJ

03/08/2011
14:37
Avatar
djkuddel
Member
Members
Forum Posts: 25
Member Since:
01/08/2011
sp_UserOfflineSmall Offline

Hi,

I find out that my params

subGridModel :[{params : ['Field1']}]

which should send the params to the php site has not the value.

So my Question is now:

How I must configure the subgrid, that I got my value to the php script.

Best Regards,

DJ

05/08/2011
14:25
Avatar
djkuddel
Member
Members
Forum Posts: 25
Member Since:
01/08/2011
sp_UserOfflineSmall Offline

Hello,

can not help anyone?

It is important for me.

Best Regards,

DJ

12/08/2011
14:13
Avatar
djkuddel
Member
Members
Forum Posts: 25
Member Since:
01/08/2011
sp_UserOfflineSmall Offline

Hi,

I solved the problem.

It is only possible to make subgrid with xml json do not work 🙁

Best Regards,

DJ

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
72 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information