ColdFusion 9 CFGRID and getDataSource()

ColdFusion , Web Development Add comments

Since the CFGRID component in ColdFusion 9 uses a newer version of Ext than CF8 did, there is a slight change that needs to be made to any scripts that use Ext's getDataSource() method to interact with the grid.  getDataSource() was replaced with getStore().

Since some of my applications need to run on both CF8 and CF9, I use this code to set the data source.

if (mygrid.getDataSource)
      ds = mygrid.getDataSource();  //cf8
      else ds = mygrid.getStore();  //cf9

Then use the ds variable any place I need to refer to it.

1 response to “ColdFusion 9 CFGRID and getDataSource()”

  1. Ray Camden Says:
    Brian Love is a weenie!!!!!!!!!

Leave a Reply

Leave this field empty:



Powered by Mango Blog. Design and Icons by N.Design Studio