Forum


19:04

15/06/2010

Hey all.. trying to add a subgrid to my project but as soon as a add subGrid : true to my config the whole grid fails to load. it just gets stuck on the loading screen.
my grid json is below, If anyone could help me out with this i'd be really gratful. Thanks!
recipe_db = ({
url:'json.php?db=recipes',
datatype: 'json',
colNames:['Name','Description'],
colModel:[
{name:'r_name',index:'r_name', width:150, editable:true, editoptions:{readonly:false}, sorttype:'int'},
{name:'r_desc',index:'r_desc', width:600, sorttype:'asc', editable:true, editrules:{readonly:false}}
],
rowNum:10,
rowTotal: 50,
rowList:[10,20,30],
pager: '#prdb',
sortname: 'id',
loadonce: false,
viewrecords: true,
sortorder: 'desc',
editurl: 'save.php?db=recipes',
caption:'Recipe DB',
hiddengrid: true,
subGrid : true,
subGridUrl: 'json.php?db=recipes',
subGridModel: [{ name : ['Name','Qty','Unit'], width : [55,200,80] } ]
})
Hi pmx,
I'm not 100% sure (i havn't seen it set up like this before) but i think it could be the way you set up subGridModel ...
subGridModel: [{ name : ['Name','Qty','Unit'], width : [55,200,80] } ]
...i think it should be like this ...
subGridModel: [{name: 'Name', width: 55},{name: 'Qty', width: 200},{name: 'Unit', width: 80}]
I hope that helps
Cheers,
Michael
12:28

15/06/2010

Hi Michael thanks for the help!!
Tried that and still the same result.. I don't even get any errors in firebug – it does send the reqest of for the json file for the main grid, just doesnt seem to respond to it for some reason…
the grids are here: http://yobah.co.uk/fplan (hosted at home, might be slow)
Cheers
Dean
04:20

16/06/2010

Hi
Though I 've not be used to this lib yet...
url:'json.php?db=recipes'
subGridUrl: 'json.php?db=recipes'
These two are correct ?
It seems you wanna make the sample of Master Detail in Demos: http://trirand.com/blog/jqgrid.....qgrid.html, and so,
URL of .phps provides json have to be different, don't they?
12:52

15/06/2010

I am just using that as it returns data with three feilds for testing... it does the same no matter what goes in there, i even tried linking it to a static data file but still no luck 🙁 The master detail thing would be ok but i'd prefer to use the subgrid to save space as all these grids will apear in lighbox like popups in the actual ui..
13:15

Moderators
30/10/2007

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
14:51

Moderators
30/10/2007

Just check your example, and the subgrid model is not the same provided in docs. Please check it again
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
16:34

Moderators
30/10/2007

Hello,
I do not think so, please consider how your subGridModel is build and compare it with the demo
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
45 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66