This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Grid › Special Character Handling in Grid
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years ago.
Hello,
I am trying to run following code, to load data in the grid:
$(document).ready(function () {
var jsonData = ‘[{\”TotalRows\”:\”2\”},’ +
‘{\”Rows\”:[‘ +
‘{ \”COL1\”:\”MN-25343\”, \”COL2\”:\”Change to PR ~`!@#$%^&*()_+1234567890-=}{][|”:\’;?></., Changed\”},{ \”COL1\”:\”MN-25342\”, \”COL2\”:\”Gdfgfg\”}]}]’;
//jsonData = JSON.parseJSON(jsonData);
var source = {
localdata: jsonData,
datafields: [{
name: ‘COL1’,
type: ‘string’,
map: ”
}, {
name: ‘COL2’,
type: ‘string’
}],
root: ‘Rows’,
datatype: “json”
};
var dataAdapter = new $.jqx.dataAdapter(source, {
beforeLoadComplete: function (records)
{
console.log(records);
return records;
},
loadComplete: function ()
{
console.log(“loadComplete”);
}
});
$(“#jqxgrid”).jqxGrid(
{
width: 850,
source: dataAdapter,
autoheight: true,
columns: [
{ text: ‘COL1’, datafield: ‘COL1’ },
{ text: ‘COL2’, datafield: ‘COL2’ }
]
});
});
loadError() function shows following error:
SyntaxError: Expected ‘}’
The grid shows no records. Please help me solve this issue.
Thank You.
Hello jkapasi,
Please, take a look at this topic below, it could be useful:
https://www.jqwidgets.com/community/topic/how-to-show-html-tag-in-cell/
You could try to use one of the approaches to represent symbols with “unicode”.
Best Regards,
Hristo Hristov
jQWidgets team
http://www.jqwidgets.com
You must be logged in to reply to this topic.