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 problem
15/06/2010
19:04
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

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] } ]
})

16/06/2010
01:58
Avatar
michaelg
Member
Members
Forum Posts: 51
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

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

16/06/2010
12:28
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

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

17/06/2010
04:20
Avatar
Doraneko
Moomin Valley
Member
Members
Forum Posts: 6
Member Since:
16/06/2010
sp_UserOfflineSmall Offline

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?Embarassed

17/06/2010
12:52
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

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..

17/06/2010
13:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

17/06/2010
14:22
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

Hi Tony,

The code in the example looks prety much the same as mine, can you see any areas where I may have gone wrong?

Thanks

Dean

17/06/2010
14:51
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

17/06/2010
15:18
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

The only thing that i can see that is different is that the example uses XML, does subgrid only work with xml?

17/06/2010
16:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

17/06/2010
17:41
Avatar
pmx
Member
Members
Forum Posts: 6
Member Since:
15/06/2010
sp_UserOfflineSmall Offline

I actually tried to copy the demo code into mine and it still failed, there is also an error (missing colon ) in the example code..

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information