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
cur is undefined
30/09/2008
15:18
Avatar
ritesh
Member
Members
Forum Posts: 5
Member Since:
30/09/2008
sp_UserOfflineSmall Offline

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.
01/10/2008
03:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

01/10/2008
08:24
Avatar
ritesh
Member
Members
Forum Posts: 5
Member Since:
30/09/2008
sp_UserOfflineSmall Offline

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.

01/10/2008
13:10
Avatar
ritesh
Member
Members
Forum Posts: 5
Member Since:
30/09/2008
sp_UserOfflineSmall Offline

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

Thanks for all your help.

01/10/2008
13:10
Avatar
ritesh
Member
Members
Forum Posts: 5
Member Since:
30/09/2008
sp_UserOfflineSmall Offline

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

Thanks for all your help.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information