Forum


04:56

15/09/2009

Hi,
I installed jGrid and configured as per the steps explained at wiki.
My server.php is return output as expected.Secondly, the grid is coming without border and without data.I defined imagepath value as below.
var gridimgpath='css/ui-lightness/images';
Also, how one can debug whether data is coming or not? when i refresh my page i see "loading.." for very short time period and then empty grid no border nothing .
please help.
05:39

15/09/2009

birt said:
Firefox with Firebug add-on is useful for debuggning…
Thanks . I am adding more details of my problem
{"page":"1","total":120,"records":"1200","rows":[{"id":"400000","cell":["400000","420000","K1010-44338","1","10.97","0","0","0"]},{"id":"400001","cell":["400001","420001","N1051-78338","1","11.62","0","0","0"]},{"id":"400002","cell":["400002","420002","L5000-62155","1","90.8","0","0","0"]},{"id":"400003","cell":["400003","420003","A6000-30766","1","4.57","0","0","0"]},{"id":"400004","cell":["400004","420003","A6060-49747","1","22.98","0","0","0"]},{"id":"400006","cell":["400006","420003","A6130-36134","1","4.5","0","0","0"]},{"id":"400009","cell":["400009","420003","N1068-28891","1","4.28","0","0","0"]},{"id":"400015","cell":["400015","420003","A1111-30633","1","1.5","0","0","0"]},{"id":"400021","cell":["400021","420003","A6110-11163","1","1.23","0","0","0"]},{"id":"400023","cell":["400023","420003","A6120-33013","1","0.2","0","0","0"]}]}
This is the response get echoed if I run server.php directly it means the server.php is working fine there is something else issue. Please help or suggest some pointer to debug.
05:43

15/09/2009

Please note :
In server.php
$sidx = $_GET['sidx']; // get index row - i.e. user click to sort
$sord = $_GET['sord']; // get the direction
In my code I have give the name of fields.
05:44

15/09/2009

Jgrid setup
<script type="text/javascript">
var gridimgpath='css/ui-lightness/images';
$(document).ready(function(){
jQuery("#list3").jqGrid({
url:'server.php?rows=10&page=1&sidx=order_id&sord=order_item_id',
datatype: "json",
mtype: 'GET',
colNames:['Order Item Id','Order Id','Sku', 'Qty', 'List Price','Shipping','Handling','Discount'],
colModel:[
{name:'order_item_id',index:'order_item_id', width:90},
{name:'order_id',index:'order_id', width:90},
{name:'sku',index:'sku', width:100},
{name:'qty',index:'qty', width:100},
{name:'list_price',index:'list_price', width:80, align:"right"},
{name:'shipping',index:'shipping', width:80, align:"right"},
{name:'handling',index:'handling', width:80,align:"right"},
{name:'discount',index:'discount', width:150} ],
rowNum:20,
rowList:[10,20,30],
pager: jQuery('#pager'),
sortname: 'id',
imgpath: gridimgpath,
viewrecords: true,
sortorder: "desc",
caption:"JSON Example"
}).navGrid('#pager',{edit:false,add:false,del:false});
});
</script>
07:04

15/09/2009

one more probelm:
The CSS is not coming fine specially of grid header!!! Is following setting is correct
var gridimgpath='css/ui-lightness/images';
13:08

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.
02:54

15/09/2009

I followed the same but in JSON. But it seems there is some other problem.Can you please guide me solving this.
04:11

Moderators
30/10/2007

Hello,
Not sure if you follow the instructions. There is no more imgpath parameter, do you see this parameter in the link provided?
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.
Most Users Ever Online: 715
Currently Online:
37 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