Hi, You can do a basic check like... if the variable has a property called "length", then it is an ArrayCollection and if it is null, then it is an Object.
Regards, Venkat On Sat, Oct 18, 2008 at 1:54 AM, rjoshicool <[EMAIL PROTECTED]> wrote: > > Hi, > > I am trying to fill a datagrid with an XML file, rendered from a PHP > script. > The problem is that - first time there is only one entry in the XML > file, so when I receive the data using event.result.root.child, I get > an Object. But second time, when there are two entries in the XML > file, the return type becomes an ArrayCollection of "child" type > objects. > This causes a problem when setting dataprovider of a DataGrid.... > So is there a way I can know what is the return type from the XML > file, i.e., whether it is an Object or an ArrayCollection, so that I > can set the dataprovider accordingly? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

