I have an intermittent error, now in the jqxGrid the &
is displayed and now it displays '&
.
Even the dataAdapter, being configured as:
contentType: 'application/json; charset=utf-8'.
How can I solve this problem?
function montarJQXGrid(jqxgrid) {
var source = {
type: "POST",
cache: false,
datatype: "json",
url: 'CadastroProduto.aspx/BuscarProdutos',
id: 'id',
datafields: [
{ name: 'id', type: 'number' },
{ name: 'nomeProduto', type: 'string' },
]
};
var dataAdapter = new $.jqx.dataAdapter(source, {
contentType: 'application/json; charset=utf-8',
formatData: function (data) { return getFormValues(); },
downloadComplete: function (data, textStatus, jqXHR) {
return $.parseJSON(data.d);
}
});
var localizationobj = {};
localizationobj.emptydatastring = "Nenhum registro";
localizationobj.loadtext = "Buscando...";
localizationobj.sortascendingstring = "Crescente";
localizationobj.sortdescendingstring = "Decrescente";
localizationobj.sortremovestring = "Remover ordenação";
$(jqxgrid).jqxGrid({
theme: theme,
localization: localizationobj,
width: '100%',
sortable: true,
height: '100%',
source: dataAdapter,
selectionmode: 'checkbox',
columnsresize: true,
columns: [
{ text: 'ID', datafield: 'id', columntype: 'textbox', width: 40 },
{ text: 'PRODUTO', datafield: 'nomeProduto', columntype: 'textbox', width: 180 }
]
});
}