No, you should not use Arrays as dataProviders.  From the Migration.pdf:

Do not use raw Arrays or Objects in your dataProvider property if the data provider's values change. The control that displays the data will not get updated when the underlying data changes. Instead, convert your provider to an ArrayCollection class, as in the following example:

 

Tracy


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of polestar11
Sent: Tuesday, July 04, 2006 10:01 AM
To: [email protected]
Subject: [Junk E-Mail - LOW] [Junk E-Mail - LOW] Re: [Junk E-Mail - LOW] [flexcoders] Dat

 

--- In [EMAIL PROTECTED]ups.com, "Shannon Hicks" <[EMAIL PROTECTED]> wrote:
>
> According to the docs, dataChange fires when the value of the
dataProvider
> param changes. Now, to my best understanding, that means that if you
> switched to a *different* dataProvider, the event would fire.

I'm still confused. Is it not advisible to use arrays as dataProviders?
I would like to use an array as a dataProvider for my dataGrid
At some point I completely change the values of the array (therefore
the dataProvider value changes)

In my actual implementation I have a datagrid where the dataprovider
references a bindable array in my model. When this value updates I
hope to catch the dataChange event. Somewhere between a search request
and response, the array gets updated:
model.searchResultsList = Array(event.call.responseObject)

My view references the updated value, which should fire tempFn():
<mx:DataGrid dataChange="tempFn()"
dataProvider="{model.searchResultsList}" >
<mx:columns>
<mx:DataGridColumn headerText="Value" labelFunction="getText" />
<mx:DataGridColumn headerText="Result" dataField="result" />
</mx:columns>
</mx:DataGrid>

Thanks for your time and patience
Tracy

__._,_.___

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





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to