Yesterday I read this:
dhtmlxGrid can now load data from common JSON format (the older version of the grid required a specific JSON structure). This simplifies the integration with external web services that return the data in JSON format.
THen I downloaded and installed the version: Suit 3.5 Standard Edition.
Today from 5:30 to 20:15 I’ve read and tried in every way how to load data JSON for the grid, but I just found this command:
function buildInterface(){
//entire code for interface init will go here
myGrid = new dhtmlXGridObject("mygrid");
myGrid.setImagePath("../static/js/Codebase/imgs/");
myGrid.setHeader("Marca,Descrizione,U.m.,Prezzo");
myGrid.setInitWidths("200,*,150,150");
myGrid.setColAlign("right,right,right,left");
myGrid.setSkin("light");
myGrid.init();
myGrid.load("aeldati","json");
}
dhtmlxEvent(window,"load", buildInterface);
I’m definitely making a big mistake because the request to the server is:
GET /aeldati
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Status: 200 OK. /aeldati
While a normal request JSON looks like this:
GET /herdati
Accept: application/json, text/javascript, /; q=0.01
Status: 200 OK. /herdati
My format is like this:
[{"idum":4,"descrizione":"Bavette 500 gr.","marca":"Federicci","tid":"oT/mIfLdggVpd+eUS","prezzo":2.1},{ ...................}]
Thank you in advance for your help.