Hi there,
I was hoping to get pushed into the right direction for this great product.
What I would like to do is run a query or stored procedure, get the resulting data set and then have the results formatted for use in dhtmlxGrid. I don’t need to write data back to the DB I am just need to display them.
I have gotten the demo to work with basic text and the xml file
(docs.dhtmlx.com/doku.php?id=tuto … populating)
However, is there a way to take the query results and pass them directly to dhtmlxGrid directly without having to write the data to a file and then reading it?
I have tried something like this:
var mygrid;
function doInitGrid(){
mygrid = new dhtmlXGridObject('mygrid_container');
mygrid.setImagePath("codebase/imgs/");
mygrid.setHeader("Model,Qty,Price");
mygrid.setInitWidths("*,150,150");
mygrid.setColAlign("left,right,right");
mygrid.setSkin("light");
mygrid.init();
mygrid.parse(<cfoutput>#xmlString#</cfoutput>);
xmlString is a valid XML object but the grid does not format like this. The source comes out like this:
var mygrid;
function doInitGrid(){
mygrid = new dhtmlXGridObject('mygrid_container');
mygrid.setImagePath("codebase/imgs/");
mygrid.setHeader("Model,Qty,Price");
mygrid.setInitWidths("*,150,150");
mygrid.setColAlign("left,right,right");
mygrid.setSkin("light");
mygrid.init();
mygrid.parse(<?xml version="1.0" encoding="UTF-8"?>
);
}
Thanks in advance!