Hi there,
I am attempting to use subgrids within my grid, and I cannot seem to get them to work using the following code.
Nothing happens when I expand…
I NEED to use JSON from the server.
Could someone please post how I should be doing this, here is my code.
var multigrid = new dhtmlXGridObject(‘mainGridBox’);
multigrid.setImagePath("codebase/imgs/");
//multigrid.setHeader("<h1><spring:message code="view.customer.summary.daily.summary.text"/></h1>,#cspan");
//multigrid.attachHeader(["<spring:message code="view.storage.user.inventory.table.header.gashour"/>"," "]);
multigrid.setHeader(["<spring:message code="view.storage.user.inventory.table.header.gashour"/>"," "]);
multigrid.setInitWidths("200, 800");
multigrid.setColAlign("left,left");
multigrid.init();
multigrid.setSkin("dhx_skyblue");
var fromDateObject = dojo.byId("fromDate");
var fromDateValue = dojo.attr(fromDateObject,"value");
var storageUserObject = dojo.byId("storageUser");
var storageUserId = dojo.attr(storageUserObject,"value");
multigrid.load("secure/summary/getGasHours?gasDay="+fromDateValue+"&storageUserId="+storageUserId, "json");
multigrid.attachEvent("onSubGridCreated",function(subgrid,id,ind,data){
subgrid.setImagePath("codebase/imgs/");
subgrid.setHeader("A,B");
subgrid.setInitWidths("100,100");
subgrid.setColAlign("left,left");
subgrid.setSkin("dhx_skyblue");
subgrid.init();
subgrid.load(data, "json");
return false;
})