CF Connector

Good morning,
i have a question. Before the connectors came out, i was using dataprocessor for the dhtmlxgrid. First off to clarify, there was a “loadXML(“getinfo.php”)” then for the dataprocessor, there was dataprocessor(“/php/update.php”). in the “getinfo.php” file i was able to add headers

while($row=mysql_fetch_array($res)) {
        <column align=center width=30 filter=true xmlcontent=2 type=co editable=false>Combo
        <option value=1>1</option>
       print("<row id='".$row['id']."'>");

How would i be albe to do this in coldfusion? Thanks for any help.

Configuration from XML currently available only in php version of connectors.

By the way introducing of connectors doesn’t prevent still use direct loadXML and dataprocessor solution.

Thanks for the reply. Yes i realize that there is no config from XML, but didnt know if there was a cffunction that could have been implemented in the Dataconnector. Also, im using coldfusion so php is out of the question. But again, i do appreciate the reply.

Hi. It is possible to load header from the cfm file and there is a sample: grid/10_config.html (in the dhtmlxConnectors for Coldfusion). The sample you can also find attached (the same as in dhtmlxConnectors archieve). The main idea: use the beforeOutput event.

<cffunction name="grid_header"> <cfif not isDefined("URL.posStart")> <cfoutput> <head> <column width="50" type="ed" align="right" color="white" sort="na">Sales</column> <column width="150" type="ed" align="left" color="##d5f1ff" sort="na">Book Title</column> <column width="100" type="ed" align="left" color="##d5f1ff" sort="na">Author</column> </head> </cfoutput> </cfif> </cffunction> <cfset grid = createObject("component",request.dhtmlxConnectors["grid"]).init(request.dhtmlxConnectors["datasource"])> <cfset grid.dynamic_loading(100)> <cfset grid.event.attach("beforeOutput",grid_header)> <cfset grid.render_table("grid50000","item_id","item_id,item_nm,item_cd")>

The new updated version of CF connectors is going to be ready soon. New functionality will be added there (for example Configuration of Grid on Server side). (1.21 KB)