Thanks Clint and Maury,

Im afraid it don't completely understand the lingo "bind the result to an 
array".

I get an error when I run the program 
ReferenceError: Error #1065: Variable  is not defined.

I think my datagrid datafields are wrong or the function is not running.

So on the function code you sent here is what I think is happening and how I 
reformatted it for my code:
protected function onListResult(roGetJob:ResultEvent):void {
        dgJob.dataProvider = ArrayCollection(roGetJob.result); }


Here is my romoteOject code:
<mx:RemoteObject id="roGetJob" destination="ColdFusion" source="test" 
endpoint="http://demo.dev/flex2gateway/"; > 
    <mx:method name="getJob">
        <mx:arguments>
            <jobNum>{jobNum.text}</jobNum>
        </mx:arguments>
    </mx:method>
</mx:RemoteObject>


Here is my data grid code:
<mx:DataGrid id="dgJob" x="10" y="274" width="356" dataProvider="">
        <mx:columns>
                <mx:DataGridColumn headerText="Job Number" dataField="JobNum"/>
                <mx:DataGridColumn headerText="Job Name" dataField="JobName"/>
                <mx:DataGridColumn headerText="Job Description" 
dataField="JobDescription"/>
        </mx:columns>
</mx:DataGrid>


Here is my cfc function
<cffunction name="getJob" returnType="query" output="no" access="remote">
        <cfargument name="jobNum" type="numeric" required="yes">

        <cfquery datasource="database" name="getJobInfo">
        SELECT JobNum, JobName, JobDescription
        FROM Job
        WHERE JobNum = #arguments.jobNum#
        </cfquery>
                        
        <cfreturn getJobInfo>
</cffunction>

Reply via email to