Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.controls.advancedDataGridClasses 
AdvancedDataGridColumnGroup 
Packagemx.controls.advancedDataGridClasses
Classpublic class AdvancedDataGridColumnGroup
InheritanceAdvancedDataGridColumnGroup Inheritance AdvancedDataGridColumn Inheritance CSSStyleDeclaration Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Use the AdvancedDataGridColumnGroup class to specify column groups for the AdvancedDataGrid control. You can specify one or more AdvancedDataGridColumn classes as children of the AdvancedDataGridColumnGroup class, or nest AdvancedDataGridColumnGroup classes to create nested column groups. The AdvancedDataGrid.columnGroup property takes an Array of AdvancedDataGridColumnGroup instances to specify the column groups.

The following example uses the AdvancedDataGridColumnGroup class to define a column group named Revenues that contains two columns: Actual and Estimate.

  <mx:AdvancedDataGrid id="myADG"
       dataProvider="{dpFlat}"
       width="100%" height="100%">
       <mx:groupedColumns>
           <mx:AdvancedDataGridColumn dataField="Region"/>
           <mx:AdvancedDataGridColumn dataField="Territory"/>
           <mx:AdvancedDataGridColumn dataField="Territory_Rep"
               headerText="Territory Rep"/>
           <mx:AdvancedDataGridColumnGroup headerText="Revenues">    
               <mx:AdvancedDataGridColumn dataField="Actual"/>
               <mx:AdvancedDataGridColumn dataField="Estimate"/>
           </mx:AdvancedDataGridColumnGroup>    
       </mx:groupedColumns>
  </mx:AdvancedDataGrid>

MXML SyntaxexpandedHide MXML Syntax

You use the <mx.AdvancedDataGridColumnGroup> tag to configure a column group of a AdvancedDataGrid control. You specify the <mx.AdvancedDataGridColumnGroup> tag as a child of the groupedColumns property in MXML. The <mx.AdvancedDataGridcolumn> tag defines the following tag attributes:

  <mx:AdvancedDataGridColumn
  Properties 
    children="No default"
    childrenDragEnabled="true|false"
  />
  

Default MXML Propertychildren

See also



Public Properties
 PropertyDefined By
  children : Array
An Array of AdvancedDataGridColumn instances that define the columns of the column group.
AdvancedDataGridColumnGroup
  childrenDragEnabled : Boolean = true
Specifies whether the child columns can be dragged to reposition them in the group.
AdvancedDataGridColumnGroup
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheriteddataField : String
The name of the field or property in the data provider item associated with the column.
AdvancedDataGridColumn
 InheriteddataTipField : String
The name of the field in the data provider to display as the data tip.
AdvancedDataGridColumn
 InheriteddataTipFunction : Function
Specifies a callback function to run on each item of the data provider to determine its data tip.
AdvancedDataGridColumn
 InheriteddefaultFactory : Function
This function, if it isn't null, is usually autogenerated by the MXML compiler.
CSSStyleDeclaration
 Inheriteddraggable : Boolean = true
A flag that indicates whether the user is allowed to drag the column to a new position If true, the user can drag the the column headers to a new position
AdvancedDataGridColumn
 Inheritededitable : Boolean = true
A flag that indicates whether the items in the column are editable.
AdvancedDataGridColumn
 InheritededitorDataField : String = "text"
The name of the property of the item editor that contains the new data for the list item.
AdvancedDataGridColumn
 InheritededitorHeightOffset : Number = 0
The height of the item editor, in pixels, relative to the size of the item renderer.
AdvancedDataGridColumn
 InheritededitorUsesEnterKey : Boolean = false
A flag that indicates whether the item editor uses Enter key.
AdvancedDataGridColumn
 InheritededitorWidthOffset : Number = 0
The width of the item editor, in pixels, relative to the size of the item renderer.
AdvancedDataGridColumn
 InheritededitorXOffset : Number = 0
The x location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item.
AdvancedDataGridColumn
 InheritededitorYOffset : Number = 0
The y location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item.
AdvancedDataGridColumn
 InheritedenableIME : Boolean
[read-only] A flag that indicates whether the IME should be enabled when the component receives focus.
AdvancedDataGridColumn
 Inheritedfactory : Function
This function, if it isn't null, is usually autogenerated by the MXML compiler.
CSSStyleDeclaration
 Inheritedformatter : Formatter
An instance of a subclasses of mx.formatters.Formatter.
AdvancedDataGridColumn
 InheritedheaderRenderer : IFactory
The class factory for item renderer instances that display the column header for the column.
AdvancedDataGridColumn
 InheritedheaderText : String
Text for the header of this column.
AdvancedDataGridColumn
 InheritedheaderWordWrap : *
Set to true to wrap the text in the column header if it does not fit on one line.
AdvancedDataGridColumn
 InheritedimeMode : String
Specifies the IME (input method editor) mode.
AdvancedDataGridColumn
 InheriteditemEditor : IFactory
A class factory for the instances of the item editor to use for the column, when it is editable.
AdvancedDataGridColumn
 InheriteditemRenderer : IFactory
The class factory for item renderer instances that display the data for each item in the column.
AdvancedDataGridColumn
 InheritedlabelFunction : Function
A function that determines the text to display in this column.
AdvancedDataGridColumn
 InheritedminWidth : Number
The minimum width of the column, in pixels.
AdvancedDataGridColumn
 Inheritedoverrides : Object
If the setStyle() method is called on a UIComponent or CSSStyleDeclaration at run time, this object stores the name/value pairs that were set; they override the name/value pairs in the objects produced by the methods specified by the defaultFactory and factory properties.
CSSStyleDeclaration
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
 InheritedrendererIsEditor : Boolean = false
A flag that indicates that the item renderer is also an item editor.
AdvancedDataGridColumn
 Inheritedresizable : Boolean = true
Set to true if the user is allowed to resize the width of the column.
AdvancedDataGridColumn
 Inheritedselector : CSSSelector
This property is the base selector of a potential chain of selectors and conditions that are used to match CSS style declarations to components.
CSSStyleDeclaration
 InheritedshowDataTips : *
Set to true to show data tips in the column.
AdvancedDataGridColumn
 Inheritedsortable : Boolean = true
Set to true to indicate that the user can click on the header of this column to sort the data provider.
AdvancedDataGridColumn
 InheritedsortCompareFunction : Function
A callback function that gets called when sorting the data in the column.
AdvancedDataGridColumn
 InheritedsortDescending : Boolean = false
Indicates whether the column sort is in ascending order, false, or descending order, true.
AdvancedDataGridColumn
 Inheritedspecificity : int
[read-only] Determines the order of precedence when applying multiple style declarations to a component.
CSSStyleDeclaration
 InheritedstyleFunction : Function
A callback function that is called when rendering each cell.
AdvancedDataGridColumn
 Inheritedsubject : String
[read-only] The subject describes the name of a component that may be a potential match for this style declaration.
CSSStyleDeclaration
 Inheritedvisible : Boolean
If true, the column is visible.
AdvancedDataGridColumn
 Inheritedwidth : Number
The width of the column, in pixels.
AdvancedDataGridColumn
 InheritedwordWrap : *
Set to false to wrap the text in a row of this column because it does not fit on one line If undefined, the AdvancedDataGrid control's wordWrap property is used.
AdvancedDataGridColumn
Public Methods
 MethodDefined By
  
Constructor.
AdvancedDataGridColumnGroup
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Clears a style property on this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
Clone this column and return a new Column with the same properties and styles as this one.
AdvancedDataGridColumn
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
getStyle(styleProp:String):*
Gets the value for a specified style property, as determined solely by this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
Returns the data from the data provider for the specified Object.
AdvancedDataGridColumnGroup
 Inherited
Returns a String that the item renderer displays as the data tip for the given data object, based on the dataTipField and dataTipFunction properties.
AdvancedDataGridColumn
 Inherited
itemToLabel(data:Object, withFormatting:Boolean = true):String
Returns the String that the item renderer displays for the given data object.
AdvancedDataGridColumn
 Inherited
Determines whether this style declaration applies to the given component based on a match of the selector chain.
CSSStyleDeclaration
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
setStyle(styleProp:String, newValue:*):void
Sets a style property on this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Styles

Styles are either common or associated with a specific theme. If the style is common, it can be used with any theme. If a style is associated with a specific theme, it can only be used if your application uses that theme.

Common Styles
 Style Description Defined By
 InheritedType: uint Format: Color CSS Inheritance: no
The background color of the column.
AdvancedDataGridColumn
 InheritedType: uint Format: Color CSS Inheritance: yes
Color of text in the component, including the component label.
AdvancedDataGridColumn
 InheritedType: uint Format: Color CSS Inheritance: yes
Color of text in the component if it is disabled.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Sets the antiAliasType property of internal TextFields.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Name of the font to use.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Sets the gridFitType property of internal TextFields that represent text in Flex controls.
AdvancedDataGridColumn
 InheritedType: Number CSS Inheritance: yes
Sets the sharpness property of internal TextFields that represent text in Flex controls.
AdvancedDataGridColumn
 InheritedType: Number Format: Length CSS Inheritance: yes
Height of the text, in pixels.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Determines whether the text is italic font.
AdvancedDataGridColumn
 InheritedType: Number CSS Inheritance: yes
Sets the thickness property of internal TextFields that represent text in Flex controls.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Determines whether the text is boldface.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: no
The name of a CSS style declaration for controlling other aspects of the appearance of the column headers.
AdvancedDataGridColumn
 InheritedType: Boolean CSS Inheritance: yes
A Boolean value that indicates whether kerning is enabled (true) or disabled (false).
AdvancedDataGridColumn
 InheritedType: Number CSS Inheritance: yes
The number of additional pixels to appear between each character.
AdvancedDataGridColumn
 InheritedType: Number Format: Length CSS Inheritance: no
The number of pixels between the container's left border and its content area.
AdvancedDataGridColumn
 InheritedType: Number Format: Length CSS Inheritance: no
The number of pixels between the container's right border and its content area.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Alignment of text within a container.
AdvancedDataGridColumn
 InheritedType: String CSS Inheritance: yes
Determines whether the text is underlined.
AdvancedDataGridColumn
 InheritedType: Number Format: Length CSS Inheritance: yes
Offset of first line of text from the left side of the container, in pixels.
AdvancedDataGridColumn
Property Detail

children

property
public var children:Array

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

An Array of AdvancedDataGridColumn instances that define the columns of the column group.

childrenDragEnabled

property 
public var childrenDragEnabled:Boolean = true

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Specifies whether the child columns can be dragged to reposition them in the group. If false, child columns cannot be reordered even if the AdvancedDataGridColumn.dragEnabled property is set to true for a child column.

The default value is true.

Constructor Detail

AdvancedDataGridColumnGroup

()Constructor
public function AdvancedDataGridColumnGroup(columnName:String = null)

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Constructor.

Parameters
columnName:String (default = null) — The name of the field in the data provider associated with the column group, and the text for the header cell of this column. This is equivalent to setting the dataField and headerText properties.
Method Detail

itemToData

()method
public function itemToData(data:Object):*

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the data from the data provider for the specified Object.

This method is useful when the data for a row contains nested Objects. For example, a row is defined by the following data in the data provider:

      row = { name:"Adobe", address : {
                                        street  : "345 Park Avenue", 
                                        city    : "San Jose",
                                        state   : "CA 95110",
                                        country : "USA"
                                      }
                       }

You then assign the "address" field to the dataField property of the AdvancedDataGridColumnGroup instance. A call to itemToData(row) then returns the address object.

This method is similar to the AdvancedDataGridColumn.itemToLabel() method.

Parameters

data:Object — The data provider element.

Returns
* — The data from the data provider for the specified Object.

See also