Hierarchical AdvancedDataGrid TreeColumn : AdvancedDataGrid « Grid « Flex






Hierarchical AdvancedDataGrid TreeColumn

Hierarchical AdvancedDataGrid TreeColumn
   

<?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%">
        <mx:dataProvider>
            <mx:HierarchicalData source="{myHierarchicalData}"/>
        </mx:dataProvider>
        <mx:columns>
            <mx:AdvancedDataGridColumn headerText="" width="50"/>
            <mx:AdvancedDataGridColumn dataField="Column1"/>
            <mx:AdvancedDataGridColumn dataField="Column2" headerText="Column 2 Rep"/>
            <mx:AdvancedDataGridColumn dataField="Value1"/>
            <mx:AdvancedDataGridColumn dataField="Value2"/>
        </mx:columns>
    </mx:AdvancedDataGrid>
</mx:Application>

   
    
    
  








Related examples in the same category

1.Use HierarchicalData.childrenField to specify the name of the field that defines the hierarchyUse HierarchicalData.childrenField to specify the name of the field that defines the hierarchy
2.AdvancedDataGrid with four columnsAdvancedDataGrid with four columns
3.Using AdvancedDataGrid to show hierarchical dataUsing AdvancedDataGrid to show hierarchical data
4.Setting up the AdvancedDataGrid with dataField and headerTextSetting up the AdvancedDataGrid with dataField and headerText
5.AdvancedDataGrid and column groupingAdvancedDataGrid and column grouping
6.ArrayCollection and AdvancedDataGridArrayCollection and AdvancedDataGrid
7.Call invalidateList to refresh and apply the style to the AdvancedDataGridCall invalidateList to refresh and apply the style to the AdvancedDataGrid
8.Use styleFunction to apply style to AdvancedDataGrid based on conditionsUse styleFunction to apply style to AdvancedDataGrid based on conditions
9.Cut and paste cell for AdvancedDataGrid the TextArea control located at the bottom of the application:Cut and paste cell for AdvancedDataGrid the TextArea control located at the bottom of the application:
10.Allow Multiple Selection for AdvancedDataGridAllow Multiple Selection for AdvancedDataGrid
11.AdvancedDataGrid with With Hierarchical DataAdvancedDataGrid with With Hierarchical Data
12.AdvancedDataGrid with SummaryFieldAdvancedDataGrid with SummaryField
13.Fill data from XML to AdvancedDataGridFill data from XML to AdvancedDataGrid
14.Change column header for Hierarchical AdvancedDataGridChange column header for Hierarchical AdvancedDataGrid
15.Hierarchical AdvancedDataGrid CategoriesHierarchical AdvancedDataGrid Categories
16.Displaying hierarchical XML data and use it in AdvancedDataGridDisplaying hierarchical XML data and use it in AdvancedDataGrid
17.Group AdvancedDataGrid with MXML Default PropertiesGroup AdvancedDataGrid with MXML Default Properties
18.An AdvancedDataGrid that displays two summary fields, Min Actual and Max ActualAn AdvancedDataGrid that displays two summary fields, Min Actual and Max Actual
19.Summary Column with AdvancedDataGridSummary Column with AdvancedDataGrid
20.Summary AdvancedDataGrid with SummaryRow and SummaryField2Summary AdvancedDataGrid with SummaryRow and SummaryField2
21.implements the AdvancedDataGrid control shown in the previous figure:implements the AdvancedDataGrid control shown in the previous figure:
22.Regrouping AdvancedDataGridRegrouping AdvancedDataGrid
23.Advanced DataGrid DemoAdvanced DataGrid Demo
24.Advanced DataGrid with Model DataAdvanced DataGrid with Model Data
25.Advanecd DataGrid for NestedGroupsAdvanecd DataGrid for NestedGroups
26.Hierarchical Advanced DataGrid Column GroupingHierarchical Advanced DataGrid Column Grouping