Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.controls.advancedDataGridClasses 
AdvancedDataGridColumn 
Packagemx.controls.advancedDataGridClasses
Classpublic class AdvancedDataGridColumn
InheritanceAdvancedDataGridColumn Inheritance CSSStyleDeclaration Inheritance EventDispatcher Inheritance Object
Implements IIMESupport
Subclasses AdvancedDataGridColumnGroup

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

The AdvancedDataGridColumn class describes a column in an AdvancedDataGrid control. There is one AdvancedDataGridColumn per displayable column, even if a column is hidden or off-screen. The data provider items of an AdvancedDataGrid control can contain properties that are not displayed, and therefore, do not need an AdvancedDataGridColumn. An AdvancedDataGridColumn allows specification of the color and font of the text in a column; specification of what kind of component displays the data for the column; specification of whether the column is editable, sortable, or resizeable; and specification of the text for the column header.

Notes:

  • An AdvancedDataGridColumn only holds information about a column; it is not the parent of the item renderers in the column.
  • If you specify an AdvancedDataGridColumn class without a dataField property, you must specify a sortCompareFunction property. Otherwise, sort operations may cause run-time errors.

MXML SyntaxexpandedHide MXML Syntax

You use the <mx.AdvancedDataGridcolumn> tag to configure a column of a AdvancedDataGrid control. You specify the <mx.AdvancedDataGridcolumn> tag as a child of the columns property in MXML. The <mx.AdvancedDataGridcolumn> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:

  <mx:AdvancedDataGridColumn
  Properties 
    dataField="No default"
    dataTipField="No default"
    dataTipFunction="No default"
    editable="true|false"
    editorDataField="text"
    editorHeightOffset="0"
    editorUsesEnterKey="false|true"
    editorWidthOffset="0"
    editorXOffset="0"
    editorYOffset="0"
    formatter="null"
    headerRenderer="AdvancedDataGridHeaderRenderer"
    headerText="No default"
    headerWordWrap="undefined"
    imeMode="null"
    itemEditor="TextInput"
    itemRenderer="AdvancedDataGridItemRenderer"
    labelFunction="No default"
    minWidth="20"
    rendererIsEditor="false|true"
    resizable="true|false"
    showDataTips="false|true"
    sortable="true|false"
    sortCompareFunction="No default"
    sortDescending="false|true"
    styleFunction="No default"
    visible="true|false"
    width="100"
    wordWrap="false|true"
 
  Styles
    backgroundColor="0xFFFFFF"
    color="No default."
    disabledColor="0xAAB3B3"
    fontAntiAliasType="advanced"
    fontFamily="No default"
    fontGridFitType="pixel"
    fontSharpness="0"
    fontSize="No default"
    fontStyle="normal|italic"
    fontThickness="0"
    fontWeight="normal|bold"
    headerStyleName="No default"
    kerning="false|true"
    letterSpacing="0"
    paddingLeft="0"
    paddingRight="0"
    textAlign="right|center|left"
    textDecoration="none|underline"
    textIndent="0"
  />
  

See also



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  dataField : String
The name of the field or property in the data provider item associated with the column.
AdvancedDataGridColumn
  dataTipField : String
The name of the field in the data provider to display as the data tip.
AdvancedDataGridColumn
  dataTipFunction : 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
  draggable : 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
  editable : Boolean = true
A flag that indicates whether the items in the column are editable.
AdvancedDataGridColumn
  editorDataField : String = "text"
The name of the property of the item editor that contains the new data for the list item.
AdvancedDataGridColumn
  editorHeightOffset : Number = 0
The height of the item editor, in pixels, relative to the size of the item renderer.
AdvancedDataGridColumn
  editorUsesEnterKey : Boolean = false
A flag that indicates whether the item editor uses Enter key.
AdvancedDataGridColumn
  editorWidthOffset : Number = 0
The width of the item editor, in pixels, relative to the size of the item renderer.
AdvancedDataGridColumn
  editorXOffset : 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
  editorYOffset : 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
  enableIME : 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
  formatter : Formatter
An instance of a subclasses of mx.formatters.Formatter.
AdvancedDataGridColumn
  headerRenderer : IFactory
The class factory for item renderer instances that display the column header for the column.
AdvancedDataGridColumn
  headerText : String
Text for the header of this column.
AdvancedDataGridColumn
  headerWordWrap : *
Set to true to wrap the text in the column header if it does not fit on one line.
AdvancedDataGridColumn
  imeMode : String
Specifies the IME (input method editor) mode.
AdvancedDataGridColumn
  itemEditor : IFactory
A class factory for the instances of the item editor to use for the column, when it is editable.
AdvancedDataGridColumn
  itemRenderer : IFactory
The class factory for item renderer instances that display the data for each item in the column.
AdvancedDataGridColumn
  labelFunction : Function
A function that determines the text to display in this column.
AdvancedDataGridColumn
  minWidth : 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
  rendererIsEditor : Boolean = false
A flag that indicates that the item renderer is also an item editor.
AdvancedDataGridColumn
  resizable : 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
  showDataTips : *
Set to true to show data tips in the column.
AdvancedDataGridColumn
  sortable : Boolean = true
Set to true to indicate that the user can click on the header of this column to sort the data provider.
AdvancedDataGridColumn
  sortCompareFunction : Function
A callback function that gets called when sorting the data in the column.
AdvancedDataGridColumn
  sortDescending : 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
  styleFunction : 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
  visible : Boolean
If true, the column is visible.
AdvancedDataGridColumn
  width : Number
The width of the column, in pixels.
AdvancedDataGridColumn
  wordWrap : *
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
  
AdvancedDataGridColumn(columnName:String = null)
Constructor.
AdvancedDataGridColumn
 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
  
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 a String that the item renderer displays as the data tip for the given data object, based on the dataTipField and dataTipFunction properties.
AdvancedDataGridColumn
  
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
  
backgroundColor
Type: uint Format: Color CSS Inheritance: no
The background color of the column. The default value is undefined, which means it uses the value of the backgroundColor style of the associated AdvancedDataGrid control. The default value for the AdvancedDataGrid control is 0xFFFFFF.
AdvancedDataGridColumn
  
color
Type: uint Format: Color CSS Inheritance: yes
Color of text in the component, including the component label. The default value is 0x0B333C.
AdvancedDataGridColumn
  
disabledColor
Type: uint Format: Color CSS Inheritance: yes
Color of text in the component if it is disabled. The default value is 0xAAB3B3.
AdvancedDataGridColumn
  
fontAntiAliasType
Type: String CSS Inheritance: yes
Sets the antiAliasType property of internal TextFields. The possible values are "normal" (flash.text.AntiAliasType.NORMAL) and "advanced" (flash.text.AntiAliasType.ADVANCED).

The default value is "advanced", which enables advanced anti-aliasing if you are using an embedded advanced anti-aliasing font. Set to "normal" to disable advanced anti-aliasing.

This style has no effect for system fonts.

This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others.

The default value is "advanced".

See also

AdvancedDataGridColumn
  
fontFamily
Type: String CSS Inheritance: yes
Name of the font to use. Unlike in a full CSS implementation, comma-separated lists are not supported. You can use any font family name. If you specify a generic font name, it is converted to an appropriate device font. The default value is "Verdana".
AdvancedDataGridColumn
  
fontGridFitType
Type: String CSS Inheritance: yes
Sets the gridFitType property of internal TextFields that represent text in Flex controls. The possible values are "none" (flash.text.GridFitType.NONE), "pixel" (flash.text.GridFitType.PIXEL), and "subpixel" (flash.text.GridFitType.SUBPIXEL).

This property only applies when you are using an embedded advanced anti-aliasing font and the fontAntiAliasType property is set to "advanced".

This style has no effect for system fonts.

This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others.

The default value is "pixel".

See also

AdvancedDataGridColumn
  
fontSharpness
Type: Number CSS Inheritance: yes
Sets the sharpness property of internal TextFields that represent text in Flex controls. This property specifies the sharpness of the glyph edges. The possible values are Numbers from -400 through 400.

This property only applies when you are using an embedded advanced anti-aliasing font and the fontAntiAliasType property is set to "advanced".

This style has no effect for system fonts.

This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others.

The default value is 0.

See also

AdvancedDataGridColumn
  
fontSize
Type: Number Format: Length CSS Inheritance: yes
Height of the text, in pixels. The default value is 10 for all controls except the ColorPicker control. For the ColorPicker control, the default value is 11.
AdvancedDataGridColumn
  
fontStyle
Type: String CSS Inheritance: yes
Determines whether the text is italic font. Recognized values are "normal" and "italic". The default value is "normal".
AdvancedDataGridColumn
  
fontThickness
Type: Number CSS Inheritance: yes
Sets the thickness property of internal TextFields that represent text in Flex controls. This property specifies the thickness of the glyph edges. The possible values are Numbers from -200 to 200.

This property only applies when you are using an embedded advanced anti-aliasing font and the fontAntiAliasType property is set to "advanced".

This style has no effect on system fonts.

This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others.

The default value is 0.

See also

AdvancedDataGridColumn
  
fontWeight
Type: String CSS Inheritance: yes
Determines whether the text is boldface. Recognized values are "normal" and "bold". For Button controls, the default is "bold". The default value is "normal".
AdvancedDataGridColumn
  
headerStyleName
Type: String CSS Inheritance: no
The name of a CSS style declaration for controlling other aspects of the appearance of the column headers. The default value is undefined, which means it uses the value of the headerStyleName style of the associated AdvancedDataGrid control. The default value for the AdvancedDataGrid control is ".advancedDataGridStyles".
AdvancedDataGridColumn
  
kerning
Type: Boolean CSS Inheritance: yes
A Boolean value that indicates whether kerning is enabled (true) or disabled (false). Kerning adjusts the gap between certain character pairs to improve readability, and should be used only when necessary, such as with headings in large fonts. Kerning is supported for embedded advanced anti-aliasing fonts only. Certain fonts, such as Verdana, and monospaced fonts, such as Courier New, do not support kerning. The default value is false.
AdvancedDataGridColumn
  
letterSpacing
Type: Number CSS Inheritance: yes
The number of additional pixels to appear between each character. A positive value increases the character spacing beyond the normal spacing, while a negative value decreases it. The default value is 0.
AdvancedDataGridColumn
  
paddingLeft
Type: Number Format: Length CSS Inheritance: no
The number of pixels between the container's left border and its content area. There is no default value for this style. An item renderer's setting of the paddingLeft property is used to determine the default.
AdvancedDataGridColumn
  
paddingRight
Type: Number Format: Length CSS Inheritance: no
The number of pixels between the container's right border and its content area. There is no default value for this style. An item renderer's setting of the paddingRight property is used to determine the default.
AdvancedDataGridColumn
  
textAlign
Type: String CSS Inheritance: yes
Alignment of text within a container. Possible values are "left", "right", or "center".

The default value for most controls is left. For the Button, LinkButton, and AccordionHeader components, the default value is "center". For these components, this property is only recognized when the labelPlacement property is set to "left" or "right". If labelPlacement is set to "top" or "bottom", the text and any icon are centered.

AdvancedDataGridColumn
  
textDecoration
Type: String CSS Inheritance: yes
Determines whether the text is underlined. Possible values are "none" and "underline". The default value is "none".
AdvancedDataGridColumn
  
textIndent
Type: Number Format: Length CSS Inheritance: yes
Offset of first line of text from the left side of the container, in pixels. The default value is 0.
AdvancedDataGridColumn
Property Detail

dataField

property
dataField:String

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

The name of the field or property in the data provider item associated with the column. Each AdvancedDataGridColumn control requires this property and/or the labelFunction property to be set in order to calculate the displayable text for the item renderer. If the dataField and labelFunction properties are set, the data is displayed using the labelFunction and sorted using the dataField. If the property named in the dataField does not exist, the sortCompareFunction must be set for the sort to work correctly.

This value of this property is not necessarily the String that is displayed in the column header. This property is used only to access the data in the data provider. For more information, see the headerText property.

This property can be used as the source for data binding. When this property is modified, it dispatches the dataFieldChanged event.



Implementation
    public function get dataField():String
    public function set dataField(value:String):void

See also

dataTipField

property 
dataTipField:String

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

The name of the field in the data provider to display as the data tip. By default, the AdvancedDataGrid control looks for a property named label on each data provider item and displays it. However, if the data provider does not contain a label property, you can set the dataTipField property to specify a different property. For example, you could set the value to "FullName" when a user views a set of people's names included from a database.

This property can be used as the source for data binding. When this property is modified, it dispatches the dataTipFieldChanged event.



Implementation
    public function get dataTipField():String
    public function set dataTipField(value:String):void

dataTipFunction

property 
dataTipFunction:Function

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

Specifies a callback function to run on each item of the data provider to determine its data tip. This property is used by the itemToDataTip() method.

By default, the control looks for a property named label on each data provider item and displays it as its dataTip. However, some data providers do not have a label property or another property that you can use for displaying data in the rows. For example, you might have a data provider that contains a lastName and firstName fields, but you want to display full names as the dataTip. You can specify a function to the dataTipFunction property that returns a single String containing the value of both fields. You can also use the dataTipFunction property for handling formatting and localization.

The function must take a single Object parameter, and return a String. For the header cell of a column, the Object parameter is of type AdvancedDataGridColumn. For table cells, the Object parameter contains the data provider element for the cell.

Shown below is an example implementation of the function. For the header cell, return "Column Name". For the table cells, return the name property of the Object:

      private function tipFunc(value:Object):String
      {
          if (value is AdvancedDataGridColumn)
              return "Column Name";
                     
          // Use the 'name' property of the data provider element.
          return "Name: " + value["name"];
      }

This property can be used as the source for data binding. When this property is modified, it dispatches the dataTipFunctionChanged event.



Implementation
    public function get dataTipFunction():Function
    public function set dataTipFunction(value:Function):void

draggable

property 
public var draggable:Boolean = true

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

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

The default value is true.

editable

property 
public var editable:Boolean = true

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

A flag that indicates whether the items in the column are editable. If true, and the AdvancedDataGrid's editable property is also true, the items in a column are editable and can be individually edited by clicking an item or by navigating to the item with the Tab and Arrow keys.

The default value is true.

editorDataField

property 
public var editorDataField:String = "text"

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

The name of the property of the item editor that contains the new data for the list item. For example, the default itemEditor is TextInput, so the default value of the editorDataField property is "text", which specifies the text property of the TextInput control.

The default value is "text".

editorHeightOffset

property 
public var editorHeightOffset:Number = 0

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

The height of the item editor, in pixels, relative to the size of the item renderer. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.

The default value is 0.

editorUsesEnterKey

property 
public var editorUsesEnterKey:Boolean = false

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

A flag that indicates whether the item editor uses Enter key. If true the item editor uses the Enter key and the AdvancedDataGrid will not look for the Enter key and move the editor in response. Note that changing this value while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.

The default value is false.

editorWidthOffset

property 
public var editorWidthOffset:Number = 0

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

The width of the item editor, in pixels, relative to the size of the item renderer. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.

The default value is 0.

editorXOffset

property 
public var editorXOffset:Number = 0

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

The x location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.

The default value is 0.

editorYOffset

property 
public var editorYOffset:Number = 0

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

The y location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.

The default value is 0.

enableIME

property 
enableIME:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

A flag that indicates whether the IME should be enabled when the component receives focus. If an editor is up, it will set enableIME accordingly.



Implementation
    public function get enableIME():Boolean

formatter

property 
formatter:Formatter

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

An instance of a subclasses of mx.formatters.Formatter. The control use this class to format the column text.

The default value is null.



Implementation
    public function get formatter():Formatter
    public function set formatter(value:Formatter):void

headerRenderer

property 
headerRenderer:IFactory

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

The class factory for item renderer instances that display the column header for the column. You can specify a drop-in item renderer, an inline item renderer, or a custom item renderer component as the value of this property.

The default item renderer is the AdvancedDataGridItemRenderer class, which displays the item data as text.

This property can be used as the source for data binding. When this property is modified, it dispatches the headerRendererChanged event.



Implementation
    public function get headerRenderer():IFactory
    public function set headerRenderer(value:IFactory):void

headerText

property 
headerText:String

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

Text for the header of this column. By default, the AdvancedDataGrid control uses the value of the dataField property as the header text.

This property can be used as the source for data binding. When this property is modified, it dispatches the headerTextChanged event.



Implementation
    public function get headerText():String
    public function set headerText(value:String):void

headerWordWrap

property 
headerWordWrap:*

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

Set to true to wrap the text in the column header if it does not fit on one line. If undefined, the AdvancedDataGrid control's wordWrap property is used. This property overrides the headerWordWrap property of the AdvancedDataGrid control.

The default value is undefined.



Implementation
    public function get headerWordWrap():*
    public function set headerWordWrap(value:any):void

imeMode

property 
imeMode:String

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

Specifies the IME (input method editor) mode. The IME mode enables users to enter text in Chinese, Japanese, and Korean. Flex sets the IME mode when the itemFocusIn event occurs, and sets it back to the previous value when the itemFocusOut event occurs. The flash.system.IMEConversionMode class defines constants for the valid values for this property.

The default value is null, in which case it uses the value of the AdvancedDataGrid control's imeMode property.



Implementation
    public function get imeMode():String
    public function set imeMode(value:String):void

See also

itemEditor

property 
public var itemEditor:IFactory

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

A class factory for the instances of the item editor to use for the column, when it is editable.

The default value is the mx.controls.TextInput control.

See also

itemRenderer

property 
itemRenderer:IFactory

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

The class factory for item renderer instances that display the data for each item in the column. You can specify a drop-in item renderer, an inline item renderer, or a custom item renderer component as the value of this property.

The default item renderer is the AdvancedDataGridItemRenderer class, which displays the item data as text.

This property can be used as the source for data binding. When this property is modified, it dispatches the itemRendererChanged event.



Implementation
    public function get itemRenderer():IFactory
    public function set itemRenderer(value:IFactory):void

See also

labelFunction

property 
labelFunction:Function

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

A function that determines the text to display in this column. By default, the column displays the text for the field in the data that matches the column name. However, sometimes you want to display text based on more than one field in the data, or display something that does not have the format that you want. In such a case, you specify a callback function using labelFunction.

For the AdvancedDataGrid control, the method signature has the following form:

labelFunction(item:Object, column:AdvancedDataGridColumn):String

where item contains the AdvancedDataGrid item object, and column specifies the AdvancedDataGrid column.

A callback function might concatenate the firstName and lastName fields in the data, or do some custom formatting on a Date, or convert a number for the month into the string for the month.

This property can be used as the source for data binding. When this property is modified, it dispatches the labelFunctionChanged event.



Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void

minWidth

property 
minWidth:Number

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

The minimum width of the column, in pixels.

The default value is 20.

This property can be used as the source for data binding. When this property is modified, it dispatches the minWidthChanged event.



Implementation
    public function get minWidth():Number
    public function set minWidth(value:Number):void

rendererIsEditor

property 
public var rendererIsEditor:Boolean = false

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

A flag that indicates that the item renderer is also an item editor. If this property is true, Flex ignores the itemEditor property and uses the item renderer for that item as the editor.

The default value is false.

resizable

property 
public var resizable:Boolean = true

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

Set to true if the user is allowed to resize the width of the column. If true, the user can drag the grid lines between the column headers to resize the column.

The default value is true.

showDataTips

property 
showDataTips:*

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

Set to true to show data tips in the column. If true, datatips are displayed for text in the rows. Datatips are tooltips designed to show the text that is too long for the row.

The default value is false.



Implementation
    public function get showDataTips():*
    public function set showDataTips(value:any):void

sortable

property 
public var sortable:Boolean = true

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

Set to true to indicate that the user can click on the header of this column to sort the data provider. If this property and the AdvancedDataGrid sortableColumns property are both true, the AdvancedDataGrid control dispatches a headerRelease event when a user releases the mouse button on this column's header. If no other handler calls the preventDefault() method on the headerRelease event, the dataField property or sortCompareFunction in the column is used to reorder the items in the data provider.

The default value is true.

sortCompareFunction

property 
sortCompareFunction:Function

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

A callback function that gets called when sorting the data in the column. If this property is not specified, the sort tries to use a basic string or number sort on the data. If the data is not a string or number or if the dataField property is not a valid property of the data provider, the sort does not work or will generate an exception. If you specify a value of the labelFunction property, you must also provide a function to the sortCompareFunction property, unless sorting is not allowed on this column.

The AdvancedDataGrid control uses this function to sort the elements of the data provider collection. The function signature of the callback function takes two parameters and has the following form:

mySortCompareFunction(obj1:Object, obj2:Object):int 

obj1 — A data element to compare.

obj2 — Another data element to compare with obj1.

The function should return a value based on the comparison of the objects:

  • -1 if obj1 should appear before obj2 in ascending order.
  • 0 if obj1 = obj2.
  • 1 if obj1 should appear after obj2 in ascending order.

Note: The obj1 and obj2 parameters are entire data provider elements and not just the data for the item.

The default value is null.

This property can be used as the source for data binding. When this property is modified, it dispatches the sortCompareFunctionChanged event.



Implementation
    public function get sortCompareFunction():Function
    public function set sortCompareFunction(value:Function):void

sortDescending

property 
public var sortDescending:Boolean = false

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

Indicates whether the column sort is in ascending order, false, or descending order, true.

The default value is false.

styleFunction

property 
styleFunction:Function

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

A callback function that is called when rendering each cell. The signature of the function should be:

function myStyleFunction(data:Object, column:AdvancedDataGridColumn):Object

data - data object associated with the item being rendered.

column - AdvancedDataGridColumn instance with which the item renderer is associated.

The return value should be a object with styles as properties having the required values. For example:

{ color:0xFF0000, fontWeight:"bold" }



Implementation
    public function get styleFunction():Function
    public function set styleFunction(value:Function):void

visible

property 
visible:Boolean

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

If true, the column is visible. Set to false to hide the column.

The default value is true.



Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void

width

property 
width:Number

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

The width of the column, in pixels. If the AdvancedDataGrid's horizontalScrollPolicy property is false, all visible columns must fit in the displayable area, and the AdvancedDataGrid will not always honor the width of the columns if the total width of the columns is too small or too large for the displayable area.

The default value is 100.

This property can be used as the source for data binding. When this property is modified, it dispatches the widthChanged event.



Implementation
    public function get width():Number
    public function set width(value:Number):void

wordWrap

property 
wordWrap:*

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

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.

The default value is undefined.



Implementation
    public function get wordWrap():*
    public function set wordWrap(value:any):void
Constructor Detail

AdvancedDataGridColumn

()Constructor
public function AdvancedDataGridColumn(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, and the text for the header cell of this column. This is equivalent to setting the dataField and headerText properties.
Method Detail

clone

()method
public function clone():AdvancedDataGridColumn

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

Clone this column and return a new Column with the same properties and styles as this one. It does not set all the available properties

Returns
AdvancedDataGridColumn — col AdvancedDataGridColumn.

itemToDataTip

()method 
public function itemToDataTip(data:Object):String

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

Returns a String that the item renderer displays as the data tip for the given data object, based on the dataTipField and dataTipFunction properties. If the method cannot convert the parameter to a String, it returns a single space.

This method is for use by developers who are creating subclasses of the AdvancedDataGridColumn class. It is not for use by application developers.

Parameters

data:Object — Object to be rendered.

Returns
String — Displayable String based on the data.

itemToLabel

()method 
public function itemToLabel(data:Object, withFormatting:Boolean = true):String

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

Returns the String that the item renderer displays for the given data object. If the AdvancedDataGridColumn or its AdvancedDataGrid control has a non-null labelFunction property, it applies the function to the data object. Otherwise, the method extracts the contents of the field specified by the dataField property, or gets the string value of the data object. If the method cannot convert the parameter to a String, it returns a single space.

Parameters

data:Object — Object to be rendered.
 
withFormatting:Boolean (default = true) — It true specifies to return the String with any formatting applied to it.

Returns
String — Displayable String based on the data.