Forum
15:18
30/09/2008
Dear Tony,
Thanks for all your hard work and support for open community. I am trying to get a sample working but getting weird error cur is undefined. Can you please help me resolve the problem.
jQuery("#list").jqGrid({
url:'dailyPL.action?q=2',
datatype: "json",
colNames:['ID','Ticker','Delivery Date', 'Maturity Date', 'Unrealized PL','Realized PL'],
colModel:[
{name:'id',index:'id', width:55},
{name:'ticker',index:'ticker', width:100},
{name:'deliveryDate',index:'deliveryDate', width:90, sorttype:"int"},
{name:'maturityDate',index:'maturityDate', width:100},
{name:'unrealized',index:'unrealized', width:80, align:"right"},
{name:'realized',index:'realized', width:80, align:"right"}
],
pager: jQuery('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'id',
sortorder: "desc",
viewrecords: true,
imgpath: 'themes/basic/images',
caption: 'My first grid'
});
{"page":"1","records":"3","rows":[{"deliveryDate":20080950,"id":"1","maturityDate":20080602,"realized"
:0.0,"ticker":"GE","unrealized":500.0},{"deliveryDate":20080950,"id":"2","maturityDate":20080602,"realized"
:0.0,"ticker":"cSC","unrealized":5000.0},{"deliveryDate":20080950,"id":"3","maturityDate":20080602,"realized"
:0.0,"ticker":"MAGNA","unrealized":6900.0}],"total":1.0}
Appreciate a lot. Thanks for your help.
03:06
Moderators
30/10/2007
Hello,
For this kind of data you need to configure the jsonReader.
Refer to documentation how to do that.
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:
41 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