On 11/23/05, Michel Bertrand <[EMAIL PROTECTED]> wrote:

> I've got "TypeError: Error #1034: Type Coersion failed: cannot convert [EMAIL 
> PROTECTED] to flash.display.DisplayObject" in Flex 2.0.
[snip]

>                         if (dataProvider != null && dataProvider.length > 0) {
>                                 for (var i:int=0;i<dataProvider.length;i++){
>                                         dataGrid.addChild(dataProvider[i]);
>                                 }
>                         }

Only objects of type DisplayObject can be added to a
DisplayObjectContainer (like DataGrid). You should be getting a
compilation error on this.

In any case, the correct way to populate a DataGrid is by setting the
'dataProvider' property, not by adding children to it.

Manish


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to