Let's back up for a minute. What exactly are you returning from your web service? If you are returning an object that can be mapped to a Flex value object, then you would do that in the result handler of the remote object in Flex. That is where you would be using the line specified.

Now, in a data grid you typically use an array collection or a normal array as the dataprovider. That array or array collection would contain a collection of the mapped VOs you are returning from your web service. The key here is to properly map the returned data to your VO. You can then reference the data field properly by going for the VO object element.

The question of what you are returning from the web service is important. The format may look different based on the back-end technology you are using (PHP, .NET, etc.)

We may need a bit more information on the environment you are running this on.

Jurgen



ehsiao_bea wrote:

Hi, Jurgen,

Not sure how you can do this within the DataGrid Control itself. Can
you please elaborate?
I would like to bind Physician.Firstname to the DataField.

JT

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>, Jurgen Beck <[EMAIL PROTECTED]> wrote:
>
> When returning a result set, make sure you are accessing the proxy
> through the object property:
>
> var myObject:yourVO = event.result.object as yourVO;
>
> Jurgen
>
> ehsiao_bea wrote:
> >
> >
> > I am calling a web service and the objects are being wrapped with
> > mx.utils.objectProxy. However, I can't seem to get the property from
> > the objectProxy by calling the getProperty method.
> >
> > <mx:DataGrid x="21" y="230" id="PatientRecord" width="792"
> > dataProvider="{wsGetPatientData.getByPatientId.lastResult}">
> > <mx:columns>
> >
> > <mx:DataGridColumn headerText="Symptoms"
> > dataField="Symptoms"/>
> > <mx:DataGridColumn headerText="Diagnosis"
> > dataField="Diagnosis"/>
> > <mx:DataGridColumn headerText="Notes" dataField="Notes"/>
> > <mx:DataGridColumn headerText="Physican"
> > dataField="Physician.getProperty(FirstName)"/>
> >
> > </mx:columns>
> >
> > Symptons, Diagnosis and Notes are coming back ok. Physician is a
> > objectproxy and I would like to get the "FirstName" QName from it. I
> > can see it in the debugger but the getProperty call does not seem to
> > do anything for me. Any hints?
> >
> > Thanks,
> > JT
> >
> >
>

Reply via email to