You could use XMLListCollection as well seems like you're trying to
apply or cast your result to an AC
El 21/04/2009, a las 14:38, Marlene <firstname.lastname@example.org> escribió:
I have a data grid that is populated from an HTTPService call. The
grid initially populates and then I want the user to be able to
click on the button search for food merchant and have the datagrid
refresh with only the food merchants. I thought I understood I
needed to use an arrayCollection but I am getting an Error #1034:
Type Coercion failed: cannot convert XMLList@187b57e9 to
mx.collections.XMLListCollection. I have tried using both an xmllist
and xmllistcollection. Any help is appreciated.
You don't need to use an ArrayCollection.
The rules are if the dgProvider is an Array it is automatically converted into an AC.
If the dgP is an XML object it is converted into an XMLListCollection with one item.
if the dgP is an XmlList it is converted into an XMLListCollection.
You can use any of these as the dataprovider including any object the implements IList or ICollectionView.
If your initial population is successful it sounds like the result handler from the search may be doing something with the data. Is the result handler for the search and the initial population the same method. Is the result from the query a null or empty result?
Unfortunately attachments are not showing up today so we cannot see your code.