dhtmlx Coldfudion query to XML or JSON

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!

Unfortunately you will have to convert your xml to a supported by dhtmlxGrid format of data, or you will have to create your own custom exCell type.
Here you can find a tutorial:
docs.dhtmlx.com/doku.php?id=dhtm … s_creation

Thanks,

I had come to that conclusion and have started working towards that goal.

Thanks again!