Setting up the AdvancedDataGrid with dataField and headerText : AdvancedDataGrid « Grid « Flex






Setting up the AdvancedDataGrid with dataField and headerText

Setting up the AdvancedDataGrid with dataField and headerText
   
<?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([
            {category:"C1", food:"a"},
            {category:"C1", food:"b"},
            {category:"C2", food:"c"}]);
      
    </mx:Script>
    <mx:AdvancedDataGrid id="adg" width="500" dataProvider="{myAC}">
        <mx:columns>
            <mx:AdvancedDataGridColumn dataField="category" headerText="Category" width="300" />
            <mx:AdvancedDataGridColumn dataField="food"     headerText="Food"     width="200" />
        </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.Hierarchical AdvancedDataGrid TreeColumnHierarchical AdvancedDataGrid TreeColumn
3.AdvancedDataGrid with four columnsAdvancedDataGrid with four columns
4.Using AdvancedDataGrid to show hierarchical dataUsing AdvancedDataGrid to show hierarchical data
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