Re: Coldfusion and dhtmlxGrid
Yes and no but mostly no. You will need to feed the grid the data and the way that most apps like this work is that you must feed it structured data in the form of XML or JSON. Technically you do not have the create a physical file and can pass it a document on the fly via CFcontent. But if you are asking: Can you feed it a raw record set from CFQuery with out an intermediary format the answer is no. It needs to be in a format that dhtmlxGrid will understand. In this case XML. HTH G! On Tue, Mar 19, 2013 at 4:09 PM, Mallory Woods mallory.wo...@gmail.comwrote: 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=3user 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:355114 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Coldfusion and dhtmlxGrid
Thanks for the reply. I think I'm on the XML bus for now. On Wed, Mar 20, 2013 at 1:14 PM, Gerald Guido gerald.gu...@gmail.comwrote: Yes and no but mostly no. You will need to feed the grid the data and the way that most apps like this work is that you must feed it structured data in the form of XML or JSON. Technically you do not have the create a physical file and can pass it a document on the fly via CFcontent. But if you are asking: Can you feed it a raw record set from CFQuery with out an intermediary format the answer is no. It needs to be in a format that dhtmlxGrid will understand. In this case XML. HTH G! On Tue, Mar 19, 2013 at 4:09 PM, Mallory Woods mallory.wo...@gmail.com wrote: 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=3user 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:355115 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Coldfusion and dhtmlxGrid
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=3user 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