Hi,
I’m trying to send the JSON data request to server but when I see the POST data in debugger, it is in the following format not in JSON format,
filterscount=0&groupscount=0&pagenum=0&pagesize=10&recordstartindex=0&recordendindex=14.606060606060606 &token=YAR40wB2u671jyZ9TlojveZfbosGYGVZ
Sample code:
var csrf={token:$('#csrftoken').val()};
var latestUsersource =
{
datatype: "json",
type: 'POST',
data:csrf,
contentType : "application/json;charset=UTF-8",
datafields: [
{ name: 'firstName', type: 'String'},
{ name: 'lastName', type: 'String'},
{ name: 'webSsoId', type: 'String'},
{ name: 'status', type: 'String'},
{ name: 'action', type: 'String' },
{ name: 'displayValue', map : 'lastModifier>displayValue', type: 'String' },
{ name: 'lastModifiedDt', type: 'String' },
{ name: 'statusImg', type: 'String'},
{ name: 'consumerId', type: 'Long'},
{ name: 'ctlFL', type: 'String'}
],
root:"userList",
url: usersChangesUrl
};
var LatestUserdataAdapter = new $.jqx.dataAdapter(latestUsersource);
It seems that, jqx library is not converting object to JSON notation. Because, when I debugged the code in “jqx-all.js”
by adding data: JSON.stringify(ac) at the place where data types are handled then my code is working fine.
Can anyone suggest me a solution?
Thanks in advance.
Cheers,
Senthil