Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






cur is undefined

No Tags
UserPost

15:18
30/09/2008


ritesh

Member

posts 5

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
01/10/2008


tony

Sofia, Bulgaria

Moderator

posts 7043

Hello,

For this kind of data you need to configure the jsonReader.

Refer to documentation how to do that.


Regards

Tony

08:24
01/10/2008


ritesh

Member

posts 5

I want to configure the grid for json. I took the sample above from JSON Data in documentation.


url:'dailyPL.action?q=2',
    datatype: "json",   

Can you please point me to what am I missing.

13:10
01/10/2008


ritesh

Member

posts 5

I got it working. The json string was not to the specification.

Thanks for all your help.

13:10
01/10/2008


ritesh

Member

posts 5

I got it working. The json string was not to the specification.

Thanks for all your help.

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

106 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9663

Posts: 28952

Membership:

There are 10357 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1167

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7043 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information