With the code below, how come I can not use a datagrid
like below without an error?

Why is data.name working in TileList but not for a
DataGrid?????

HELP!!!! :)

{
                <mx:DataGrid dataProvider="{xlc}">
                        <mx:columns>
                                <mx:DataGridColumn dataField="{data.name}"
headerText="Name"/>
                                <mx:DataGridColumn dataField="{data.price}"
headerText="Price"/>
                                <mx:DataGridColumn dataField="{data.brand}"
headerText="Brand"/>                                                            
        
                                </mx:DataGridColumn>
                        </mx:columns>
                </mx:DataGrid> 
}

===============================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml";
        creationComplete="catalogService.send()"
viewSourceURL="srcview/index.html">

        <mx:Script>
                <![CDATA[
                        private function filterProduct(item:Object):Boolean
                        {
                                return item.name.match(new RegExp("^" +
brandText.text, "i"));

                        }
                ]]>
        </mx:Script>
        <mx:HTTPService id="catalogService"
url="http://127.0.0.1/scratch/Flex/FlexDemo/catalog.xml";
                resultFormat="e4x" />
        <mx:XMLListCollection id="xlc"
                source="{catalogService.lastResult.*}"
                filterFunction="filterProduct" />
        <mx:Panel title="Product Catalog" width="380"
height="385">
                <mx:TileList dataProvider="{xlc}" width="100%"
height="300"
                        columnCount="2" rowCount="2">
                        <mx:itemRenderer>
                                <mx:Component>
                                        <mx:VBox paddingLeft="30" width="150"
height="150"
                                                horizontalScrollPolicy="off"
verticalScrollPolicy="off">

                                                <mx:Label text="{data.name}" />
                                                <mx:Label text="{data.price}"/>
                                                <mx:Label text="{data.brand}"/> 
                                                
                                        </mx:VBox>
                                </mx:Component>
                        </mx:itemRenderer>
                </mx:TileList>  
                
                <mx:ControlBar>
                        <mx:Label text="Brand" />
                        <mx:TextInput id="brandText" width="75"
                                change="xlc.refresh()" />
                </mx:ControlBar>
        </mx:Panel>
</mx:Application>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




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