I sure you can. See the item renderer section from the Flex Developer Guide.

Below is just a small example I put together. You just need to add  model.xml at your convenience.

HTH,
Valy


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
   
       
     <mx:Model id="model" source="model.xml"/>
    
     <mx:Component id="myRenderer">

        <mx:VBox horizontalAlign="center" verticalAlign="middle" width="100%">
       
         <mx:Script>
            <![CDATA[
                import mx.controls.*;
                public function changeEvt(event:Event):void {
                    Alert.show("Selected Element:" + [EMAIL PROTECTED]);
                }
            ]]>
        </mx:Script>
       
         <mx:Tree id="myTree" labelField="@label" showRoot="true" width="100%" change="changeEvt(event);">
            <mx:XMLList>
              <node label="New">
                  <node label="HTML Document"/>
                  <node label="Text Document"/>
              </node>
            <node label="Close"/>
        </mx:XMLList>
          </mx:Tree>
        </mx:VBox>
    </mx:Component>

    <mx:DataGrid rowCount="3" variableRowHeight="true" dataProvider="{model.piece}">
        <mx:columns>          
            <mx:DataGridColumn headerText="Tree"  dataField="quantity" itemRenderer="{myRenderer}" width="400"/>
            <mx:DataGridColumn headerText="Quantity"  dataField="quantity" width="400"/>

        </mx:columns>
       
    </mx:DataGrid>
</mx:Application>





pirvulescu_adrian <[EMAIL PROTECTED]> wrote:
Can anybody tell me if it's possible to have a tree component in a
datagrid item ?

Pirvulescu Adrian
Romania



Want to be your own boss? Learn how on Yahoo! Small Business. __._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to