Hi,
I'm using the grid to display remote records like this example
http://paramquery.com/demos/filterThe records returned 5 rows for example, and the grid display them, but the grid display these all empty.
Can someone help me?
My .net code returns looks like String response = "{\"data\":" + json + "}";
return this.Content(response, "text/text");
and my Js datamodel
var dataModel = {
location: "remote",
sorting: "remote",
paging: "remote",
dataType: "JSON",
method: "GET",
curPage: 1,
rPP: 5,
sortIndx: 2,
sortDir: "up",
rPPOptions: [1, 5, 20, 30, 40, 50, 100, 500, 1000],
filterIndx: "",
filterValue: "",
fields: ['IdClasseInstrumento', 'Classe', 'Descricao', 'TipoPessoa', 'RPPS'],
getUrl: function () {
var sortDir = (this.sortDir == "up") ? "asc" : "desc";
var queryString = "cur_page=" + this.curPage + "&records_per_page=" +
this.rPP + "&sortBy=" + this.fields[this.sortIndx] + "&dir=" + sortDir;
if (this.filterIndx != null && this.fields[this.filterIndx]) {
queryString += "&filterBy=" + this.fields[this.filterIndx] + "&filterValue=" + this.filterValue;
}
var obj = { url: "/ClasseInstrumento/Load", data: queryString };
return obj;
},
getData: function (dataJSON) {
return { data: dataJSON.data };
// return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
},
error: function (jqXHR, textStatus, errorThrown) {
alert(textStatus);
}
}