Hi all,

I'm trying to use dhtmlxGrid in one of my projects and I had a question.

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:

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"?>
<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>);

}
Thanks in advance!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355102
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to