EasyUI Forum
October 10, 2024, 09:50:36 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Type Errors  (Read 16804 times)
baxter
Newbie
*
Posts: 32


View Profile Email
« on: September 10, 2012, 01:39:43 AM »

When i load a datagid, i have the the follow errors in firebug:

I use jquery-easyui-1.3.1 with jquery 1.7.2 with the following code:

Code:
   $('#domainClose').datagrid({  
url:'/jclient.php',
pagination: true,
singleSelect: true,
sortName: 'closetime',
sortOrder: 'ASC',
fitColumns: true,
idField:'orderid',
loadMsg: LG1342,
queryParams: {"methode": "viewDeleteOrders"},
columns:[[  
   {field:'orderid',title:'ID',width:60, sortable: true},  
   {field:'domain',title:LG904, width:200, sortable: true},  
   {field:'status',title:LG940, width:100, sortable: true},
   {field:'closetime',title:LG1276, width:120, sortable: true}
]]
    });

« Last Edit: September 10, 2012, 01:43:02 AM by baxter » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 10, 2012, 02:46:32 AM »

Please confirm the data returned from '/jclient.php' is correct. Try the loadFilter to see what data will be loaded into datagrid.

Code:
$('#domainClose').datagrid({
url: '/jclient.php',
loadFilter: function(data){
console.log(data);
return data;
},
//...
});
Logged
baxter
Newbie
*
Posts: 32


View Profile Email
« Reply #2 on: September 10, 2012, 07:02:20 AM »

I had check the json data, there a correct.

Code:
{"total":"726","rows":[
{"orderid":"182882","domain":"domain1.co.uk","status":"CLOSE-WAIT","closetime":"02.07.2010 17:07:27"},
{"orderid":"189156","domain":"domain2.co.uk","status":"CLOSE-WAIT","closetime":"18.09.2011 23:00:00"},
{"orderid":"189469","domain":"domain3.me.uk","status":"CLOSE-WAIT","closetime":"06.10.2011 23:00:00"},
{"orderid":"189499","domain":"domain4.co.uk","status":"CLOSE-WAIT","closetime":"10.10.2011 23:00:00"},
{"orderid":"191061","domain":"domain5.co.uk","status":"CLOSE-WAIT","closetime":"28.12.2011 23:00:00"},
]}
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: September 10, 2012, 07:51:09 AM »

There are some mistakes in your json data. Please correct it as:

Code:
{"total":726,"rows":[
{"orderid":"182882","domain":"domain1.co.uk","status":"CLOSE-WAIT","closetime":"02.07.2010 17:07:27"},
{"orderid":"189156","domain":"domain2.co.uk","status":"CLOSE-WAIT","closetime":"18.09.2011 23:00:00"},
{"orderid":"189469","domain":"domain3.me.uk","status":"CLOSE-WAIT","closetime":"06.10.2011 23:00:00"},
{"orderid":"189499","domain":"domain4.co.uk","status":"CLOSE-WAIT","closetime":"10.10.2011 23:00:00"},
{"orderid":"191061","domain":"domain5.co.uk","status":"CLOSE-WAIT","closetime":"28.12.2011 23:00:00"}
]}
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!