Use groupedColumns component to group columns together : AdvancedDataGridColumn « Grid « Flex






Use groupedColumns component to group columns together

Use groupedColumns component to group columns together
         
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        import mx.collections.ArrayCollection;
        public var myAC:ArrayCollection = new ArrayCollection([
            {dest:'A', min:'4 mins', max:'9 mins'},
            {dest:'B', min:'6 mins', max:'1 mins'},
            {dest:'C', min:'2 mins', max:'6 mins'}]);
      
    </mx:Script>
    <mx:AdvancedDataGrid dataProvider="{myAC}" width="300">
        <mx:groupedColumns>
            <mx:AdvancedDataGridColumn dataField="dest" headerText="Destination" />
            <mx:AdvancedDataGridColumnGroup headerText="Commute Time">
                <mx:AdvancedDataGridColumn dataField="min" headerText="Min" />
                <mx:AdvancedDataGridColumn dataField="max" headerText="Max" />
            </mx:AdvancedDataGridColumnGroup>
        </mx:groupedColumns>
    </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.Custom icons for the folder open and closed iconsCustom icons for the folder open and closed icons
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