Thank you Azadi, I cant believe i didnt var my variables in that function - i var them with an almost religious fervour normally. Guess i was in too much of a hurry.
I didnt know about queryConvertForGrid() sounds like the problem. I must have skipped over that in the docs about CFGrid. Thanks everyone. On Mon, Nov 10, 2008 at 3:52 AM, Azadi Saryev <[EMAIL PROTECTED]> wrote: > 1) in your cfc function's return use: <cfreturn > queryConvertForGrid(QGetCountries, arguments.cfgridpage, > arguments.cfgridpagesize) /> > 2) is there an Application.cfc with an onRequest() method anywhere that > the Utilitieslibrary cfc will be affected by? > 3) var your cfc variables :) > > Azadi Saryev > Sabai-dee.com > http://www.sabai-dee.com/ > > > > Mike Kear wrote: >> I am experimenting with the ajax parts of CF8, and I'm following the >> video on the Adobe site where it shows how to build a master detail >> application using the CF8 inbuilt ajax stuff. >> >> It has a CFGRID tag, which binds to a cfc method. There's where my >> problem arises i think. I have a simply utilities cfc that has some >> commonly used methods, one of which is getCountries() which returns a >> query containing country names and abbreviations. >> >> When i call the method using the tags i've always used, i get a query >> object which i can dump and it shows exactly what i'd expect. >> However when i use CFGrid, bound to the same method, I get an empty >> query, and therefore an empty grid. I'be checked that the method >> is access=remote, but what else have i missed? >> >> Here's the CFGrid tag: >> >> <cfform scriptsrc="/cms/forms/scripts" > >> <cfgrid name="TrialGrid" format="html" pagesize="15" >> bind="cfc:cfcs.utilities.utilitieslibrary.GetCountriesGrid( >> {cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection} >> )" bindonload="yes" > >> <cfgridcolumn name="country" header="Country" display="yes" /> >> <cfgridcolumn name="countrycode" header="Country Code" display="yes" /> >> <cfgridcolumn name="countryid" header="countryid" display="no" /> >> </cfgrid> >> </cfform> >> >> >> and here's the method in the Utilitieslibrary cfc : >> >> <cffunction name="GetCountriesGrid" output="false" returntype="query" >> access="remote" hint="Returns a list of countries for drop down list"> >> <cfargument name="cfgridpage" required="no" type="string" /> >> <cfargument name="cfgridpagesize" required="no" type="string" /> >> <cfargument name="cfgridsortcolumn" required="no" type="string" /> >> <cfargument name="cfgridsortdirection" required="no" type="string" /> >> >> <cfquery name="QGetCountries" datasource="thetestdsn"> >> SELECT Country, countrycode, countryid FROM Countries ORDER BY Country >> </cfquery> >> <cfreturn QGetCountries /> >> </cffunction> >> >> Can anyone see why calling this method using CFINVOKE returns a >> result and using CFGrid doesnt? >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315007 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

