Forum
Topic RSS
Related Topics
14:36
20/09/2010
OfflineHi all,
When i try to use the search feature (i write a text in the seach form, the errors come when i press enter) of jqGrid i get a JS error:
Uncaught SyntaxError: Unexpected token ILLEGAL --- jquery.jqGrid.min.js - line 21
I make the table with this code:
jQuery("#table").jqGrid({ datatype: "local"
,height: "auto"
,colNames:["ID","Name","Surname","Email"]
,colModel:[
{name:'ID', index:'ID', width : 160, sortable : true, align: 'left', title: false, key:true}
,{name:'Name', index:'Name', width : 110, sortable : true, align: 'left', title: false}
,{name:'Surname', index:'Surname', width : 160, sortable : true, align: 'left', title: false}
,{name : 'Email', index:'Email', width : 160, sortable : true, align: 'left', title: false}
]
,autowidth: true
,sortname: 'ID'
,sortorder: "desc"
,rowNum: 20
,rowList: [20,40,60]
,pager: '#tableDiv'
,viewrecords: true
,onSelectRow: function (p_id) { edit(p_id) }
}).navGrid('#tableDiv', {search:true, edit: false, add:true, del:false});
And i fill it with a code like this:
jQuery("#table").clearGridData();
var f,F = jsonData.length;
for ( f=0; f<F; f++ ) {
$("#table").jqGrid('addRowData',jsonData[f]["ID"],jsonData[f]);
}
$("#table").setGridParam({rowNum:20}).trigger("reloadGrid");
What is wrong? I have looked everything but i cant fix it.
Very much thanks!
Most Users Ever Online: 994
Currently Online:
21 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
Log In
Home