I would like to know if it is possible to init a grid using the object initialization method and json data. I only see examples (15_init_grid_o_api.html) that use xml for the data source.
Here is the grid init code:
mygrid = new dhtmlXGridObject({
parent: 'table-demo',
image_path: "/Scripts/dhtml/imgs/",
skin: "dhx_skyblue",
columns: [
{ label: "Name", id: "Name", type: "ro", sort: "str", align: "center", width: 160},
{ label: "Position", id: "Position", type: "ro", sort: "str", align: "center", width: 160},
{ label: "Salary", id: "Salary", type: "ro", sort: "str", align: "center", width: 100},
{ label: "Start Date", id: "StartDate", type: "ro", sort: "str", align: "center", width: 100},
{ label: "Office", id: "Office", type: "ro", sort: "str", align: "center", width: 225},
{ label: "Ext", id: "Extension", type: "ro", sort: "str", align: "center", width: 60}],
multiline:false,
load: "/Home/GetDemoJson" //this is the line in question, doesn't seem to do anything
});
//without these it doesn't do anything
mygrid.init();
mygrid.load('/Home/GetDemoJson', "js");
This renders the grid with the appropriate number of rows but there is no data is in the grid.
Any help?