dhtmlx ColdFusion query to XML or JSON

pixels72

New Member
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(http://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:\[code\]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>);\[/code\]xmlString is a valid XML object but the grid does not format like this. The source comes out like this:\[code\]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"?><users columns="3" rows="3"><user fname="Nathan" id="292B71DC-9DDD-BA4F- A95BF84F85CAF661" lname="Dintenfass"/><user fname="Ben" id="292B71DD-0893-326D- 79269A1DCFD46D37" lname="Archibald"/><user fname="Raymond" id="292B71DE-E781-43FE- A4DCD955A1A5C044" lname="Jones"/></users>);}\[/code\]Thanks in advance!
 
Back
Top