Forum


00:08

16/05/2010

Hi all! I nee your help. I cannot load data from backend. I used "json" datatype and when i try to load data i responesed "c is undefined".
JSON response:
{"rows":[{"id":"1","authority":"ROLE_ADMINISTRATOR","creationDate":"2005-07-23 02:16:57.0","lastName":
"Adminich","login":"root","firstName":"CardAdmin","password":"63a9f0ea7bb98050796b649e85481845"}]}
It`s my table:
jQuery("#usersGrid").jqGrid({
url: "getUsersList.do",
mtype: "GET",
datatype: "json",
height: 500,
width: (document.getElementById('info').offsetWidth – 40),
colNames:['Id','Creation date', 'Login', 'First name','Last name','Role'],
colModel:[
{name:'id',index:'id', width:60, sorttype:"int"},
{name:'creation_date',index:'creation_date', width:120, sorttype:"date"},
{name:'login',index:'login', width:150},
{name:'firstName',index:'firstName', width:80, align:"right",sorttype:"float"},
{name:'lastName',index:'lastName', width:80, align:"right",sorttype:"float"},
{name:'authority',index:'authority', width:100,align:"right",sorttype:"float"}
],
multiselect: true,
hidegrid: false,
toolbar: [true,"top"],
pager: jQuery('#pager'),
rowNum:10,
rowList:[5,10,15],
sortname: 'id',
onCellSelect: function(id) {
var selected = jQuery("#usersGrid").getRowData(id);
alert(selected['name']);
},
viewrecords: true
});
Please help me!
22:11

Moderators
30/10/2007

Hello,
configure your jsonReager for this purpose. The default one is not applicable for your response.
http://www.trirand.com/jqgridw.....#json_data
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:
85 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