Cfgrid JS binding issue is fixed in Coldfusion 11 update 3

Coldfusion 11 update 3 fixed the cfgrid javascript binding issue.(bug number 3712909,3712885)

Prior to this, js binding was broken where as CFC binding as well as URL binding were wroking properly.

As a result pagination, dynamic binding etc were not working if js binding was used though basic static grid was working properly.

Even query columns were not getting mapped to their associated grid columns.

This had happened due to our internal upgrade of EXTJS framework which did not support js binding.

So we had to write a custom js binding wrapper to make it work in coldfusion. Now everything works fine in JS binding

Workaround for ajax cfgrid bug in CF11 in which ajaxonload() is not working properly

In coldfusion 11 release there is an open bug in which if you try to use any ColdFusion.grid related function in a function that is called by ajaxOnLoad, the grid object will not be available. 

A grid will load properly, but when the javascript function is called with AjaxOnLoad and  function tries to reference the grid, you will get that the reference is “undefined”.

This is a sample code :



      <title>AjaxOnLoad test</title> 


            init = function() 


                ColdFusion.Grid.sort(‘datagrid’, ‘col_one’, ‘ASC’);





        <cfform name=’formOne’>

            <cfgrid name=’datagrid’ format=”html” textcolor=”blue”>

                <cfgridcolumn name=’col_one’>

                <cfgridrow data=”data1″>

                <cfgridrow data=”data2″>

                <cfgridrow data=”data3″>



        <cfset AjaxOnLoad(“init”)> 



The above code will break at “ColdFusion.Grid.sort(‘datagrid’, ‘col_one’, ‘ASC’);” as grid object will not be available at that moment.


Workaround :

The current workaround for this issue is to wrap the references to the grid objects within Ext.onReady method, like this:

   init = function() 


   Ext.onReady(function ()


                                 ColdFusion.Grid.sort(‘datagrid’, ‘col_one’, ‘ASC’);




Note: Fix for this bug will be available in next update