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.

3 responses to “ColdFusion 9 CFGRID and getDataSource()”

  1. Ray Camden Says:
    Brian Love is a weenie!!!!!!!!!
  2. Stephane Says:
    Thanks man, we've just migrated from CF8 to CF9 and I was wondering if I could solve the issue... till I read your post... Thanks again!
  3. Helen Says:
    Thank you so much for this code hint. This resolved a problem I had been having when porting code to CF9.

Leave a Reply

Leave this field empty:



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