Custom icons for the folder open and closed icons : AdvancedDataGridColumn « Grid « Flex






Custom icons for the folder open and closed icons

Custom icons for the folder open and closed icons
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        import mx.collections.ArrayCollection;
        private var myHierarchicalData:ArrayCollection = new ArrayCollection([
        
            {Column1:"A", children: [
                          {Column1:"B", children: [
                                        {Column2:"C", Value1:3, Value2:4},
                                        {Column2:"D", Value1:2, Value2:3}]},
                                        {Column1:"E", children: [{Column2:"F", Value1:2, Value2:3}]},
                                                      {Column1:"G", children: [{Column2:"H", Value1:5, Value2:4}]},
                                                                    {Column1:"I", children: [{Column2:"J", Value1:3, Value2:4},
                                                                                  {Column2:"K", Value1:5, Value2:4}]},
                                                                                  {Column1:"L", children: [{Column2:"M", Value1:4, Value2:4},{Column2:"N", Value1:4, Value2:4}]}
                         ]}
        ]);
      
    </mx:Script>
    <mx:AdvancedDataGrid width="100%" height="100%" folderOpenIcon="@Embed(source='a.jpg')"
                                                    folderClosedIcon="@Embed(source='a.jpg')">
        <mx:dataProvider>
            <mx:HierarchicalData source="{myHierarchicalData}" />
        </mx:dataProvider>
        <mx:columns>
            <mx:AdvancedDataGridColumn dataField="Column1" />
            <mx:AdvancedDataGridColumn dataField="Column2" headerText="Column 2" />
            <mx:AdvancedDataGridColumn dataField="Value1" />
            <mx:AdvancedDataGridColumn dataField="Value2" />
        </mx:columns>
    </mx:AdvancedDataGrid>
</mx:Application>

   
    
  








Related examples in the same category

1.AdvancedDataGridColumn for the GroupLabel fieldAdvancedDataGridColumn for the GroupLabel field
2.Add multiple groups to the controlAdd multiple groups to the control
3.AdvancedDataGridColumn inside ColumnsAdvancedDataGridColumn inside Columns
4.Set default leaf icon to null to hide itSet default leaf icon to null to hide it
5.Use groupedColumns component to group columns togetherUse groupedColumns component to group columns together
6.Create the column groupingCreate the column grouping
7.Multiple column sort when the sortExpertMode property is set to trueMultiple column sort when the sortExpertMode property is set to true
8.Add groups named Area and RevenuesAdd groups named Area and Revenues
9.Column Grouping for Hierarchical DataColumn Grouping for Hierarchical Data
10.Regroup GroupCollectionRegroup GroupCollection