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?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top