Forum
16:08
31/10/2014
Hi,Â
I'm getting following error when using postData to send parameter to load records in grid.Â
"Cannot convert object of type 'System.String' to type 'System.Collections.Generic.IDictionary`2[System.String,System.Object]"
below is my code:
jQuery("#jQGridStudents").jqGrid({
loadError: function(xhr, status, error) {
Notify('Error', error);},
url: './mytestpage.aspx/GetStudentsList',
mtype: 'POST',
postData:Â "{showAll: '" + $("#chkShowAll").prop("checked") + "'}",
datatype: "json",
ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
serializeGridData: function(postData) {
alert(postData);
return JSON.stringify(postData);
},
jsonReader: {
root: function(obj) { return obj.d; },
page: function(obj) { return obj.d.page; },
total: function(obj) { return obj.d.total; },
records: function(obj) { return obj.length; },
id: 'ID',
cell: '',
repeatitems: false
},
Â
When i remove the serializeGridData property record get loaded but the built in search stop workring. I am using inline navigation along with auto search true as below
 $('#jQGridStudents').jqGrid('filterToolbar', { autosearch: true, searchOnEnter: false });
Any suggestions where i'm doing wrong?
18:19
Moderators
30/10/2007
Hello,
Â
postData is a object and not a string. In your implementation you set it as string.
Â
Regards
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.
11:40
Moderators
30/10/2007
Hello,
Â
Thanks for feedback.
Â
Regards
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:
42 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