Probably the structure of the result object is not exactly what you expect.

 

I don’t know what a “queryset” is.  It is certainly not a Flex data structure.

 

By default, the operation’s resultFormat=”object”.  Flex converts the actual result into an mx:Object. You need to debug this object to find out exactly what the structure is.

 

I personally prefer resultFormat=”e4x”, as that results in an XML object, which, among other benefits, can be displayed using toXMLString()

 

For the DataColumn to be able to find the data for dataField, that data must be in a first-level property of the item object.  If it is nested in some other object or node, then you will need to use a labelFunction to display it.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of bghoward3
Sent: Wednesday, September 27, 2006 10:42 AM
To: [email protected]
Subject: [flexcoders] Re: datgrid fills but content is invisible

 

here is code i am using
it is returning a queryset not an xml string

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="wsUserTeams.getAllTeams.send()">

<mx:Script>
<![CDATA[
[Bindable]
public var selectedItem:Object;
]]>
</mx:Script>

<mx:WebService id="wsUserTeams"
wsdl="http://sitename/model/cfc_UserTeams.cfc?wsdl" useProxy="false">
<mx:operation name="getAllTeams">
<mx:request>
<strDSN>ProjMan</strDSN>
</mx:request>
</mx:operation>
</mx:WebService>
<mx:DataGrid x="30" y="75" id="dgTeam" width="400"
dataProvider="{wsUserTeams.getAllTeams.lastResult}" name="dgTeam">
<mx:columns>
<mx:DataGridColumn dataField="intProjTeamID"
headerText="TeamID" width="75"/>
<mx:DataGridColumn
dataField="strProjTeamName" headerText="Team"/>
</mx:columns>
</mx:DataGrid>
<mx:ComboBox x="498" y="89" width="310" name="dgTeam2"
labelField="strProjTeamName"
dataProvider="{wsUserTeams.getAllTeams.lastResult}" id="dgTeam2"
close="selectedItem=ComboBox(event.target).selectedItem"/>
<mx:VBox width="250">
<mx:Label text="You selected: {selectedItem.label}"/>
<mx:Label text="Data: {selectedItem.data}"/>
</mx:VBox>

</mx:Application>

--- In [EMAIL PROTECTED]ups.com, "passive_thoughts"
<passive_thoughts@...> wrote:
>
> can you post the code for your datagrid and the webservice?
>
>
> --- In [EMAIL PROTECTED]ups.com, "bghoward3" <billhoward@> wrote:
> >
> > i am populating a datagrid via a web service, i am succesfully
making
> > the connection and pulling in data however when the datagrid
populates
> > no text appears in the grid. i know it is filling it with data
because
> > the correct number of lines are added to the grid when the
connection
> > is made, it just does not seem to display the content
> >
> > any thoughts?
> >
> > thank you
> >
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to