Package | spark.components |
Class | public class DataGrid |
Inheritance | DataGrid ![]() ![]() ![]() ![]() ![]() |
Implements | IFocusManagerComponent, IIMESupport |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The Spark DataGrid control is implemented as a skinnable wrapper around the Spark Grid control. The Grid control defines the columns of the data grid, and much of the functionality of the DataGrid control itself.
The DataGrid skin is responsible for laying out the grid, column header, and scroller. The skin also configures the graphic elements used to render visual elements used as indicators, separators, and backgrounds. The DataGrid skin also defines a default item renderer, used to display the contents of each cell. Please see the documentation for the renderer class for the list of supported styles.
Transitions in DataGrid item renderers aren't supported. The GridItemRenderer class
has disabled its transitions
property so setting it will have no effect.
The <s:DataGrid>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:DataGrid Properties columns="null" dataProvider="null" dataTipField="null" dataTipFunction="null" editable="false" editorColumnIndex="-1" editorRowIndex="-1" imeMode="null" itemEditor="null" itemRenderer="DefaultGridItemRenderer" preserveSelection="true" requestedColumnCount="-1" requestedMaxRowCount="-1" requestedMinColumnCount="-1" requestedMinRowCount="-1" requestedRowCount="-1" requireSelection="false" resizeableColumns="true" rowHeight="Calculated default" selectedCell="null" selectedCells="empty Vector.<CellPosition>" selectedIndex="null" selectedIndices="empty Vector.<CellPosition>" selectedItem="null" selectedItems="empty Vector.<Object>" selectionMode="singleRow" showDataTips="false" sortableColumns="true" typicalItem="null" variableRowHeight="false" Styles alignmentBaseline="useDominantBaseline" baselineShift="0.0" cffHinting="horizontalStem" color="0" defaultGridItemEditor="null" digitCase="default" digitWidth="default" direction="ltr" dominantBaseline="auto" fontFamily="Arial" fontLookup="device" fontSize="12" fontStyle="normal" fontWeight="normal" justificationRule="auto" justificationStyle="auto" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" stretchCursor="cursorStretch symbol from Assets.swf" textAlign="start" textAlignLast="start" textAlpha="1" textDecoration="none" textJustify="interWord" trackingLeft="0" trackingRight="0" typographicCase="default" verticalScrollPolicy="auto" Styles for the Spark Theme alternatingRowColors="undefined" borderAlpha="1.0" borderColor="0x696969" borderVisible="true" caretColor="0x0167FF" contentBackgroundAlpha="1.0" contentBackgroundColor="0xFFFFFF" rollOverColor="0xCEDBEF" selectionColor="0xA8C6EE" symbolColor="0x000000" Styles for the Mobile Theme leading="0" letterSpacing="0" selectionColor="0xE0E0E0" symbolColor="0x000000" Events caretChange="No default" gridClick="No default" gridDoubleClick="No default" gridItemEditorSessionCancel="No default" gridItemEditorSessionSave="No default" gridItemEditorSessionStart="No default" gridItemEditorSessionStarting="No default" gridMouseDown="No default" gridMouseDrag="No default" gridMouseUp="No default" gridMouseRollOut="No default" gridMouseRollOver="No default" selectionChange="No default" selectionChanging="No default" sortChange="No default" sortChanging="No default" />
Default MXML PropertydataProvider
See also
Property | Defined By | ||
---|---|---|---|
![]() | accessibilityDescription : String
A convenience accessor for the description property
in this UIComponent's accessibilityProperties object. | UIComponent | |
![]() | accessibilityEnabled : Boolean
A convenience accessor for the silent property
in this UIComponent's accessibilityProperties object. | UIComponent | |
![]() | accessibilityName : String
A convenience accessor for the name property
in this UIComponent's accessibilityProperties object. | UIComponent | |
![]() | accessibilityShortcut : String
A convenience accessor for the shortcut property
in this UIComponent's accessibilityProperties object. | UIComponent | |
![]() | activeEffects : Array [read-only]
The list of effects that are currently playing on the component,
as an Array of EffectInstance instances. | UIComponent | |
![]() | automationDelegate : Object
The delegate object that handles the automation-related functionality. | UIComponent | |
![]() | automationEnabled : Boolean [read-only]
True if this component is enabled for automation, false
otherwise. | UIComponent | |
![]() | automationName : String
Name that can be used as an identifier for this object. | UIComponent | |
![]() | automationOwner : DisplayObjectContainer [read-only]
The owner of this component for automation purposes. | UIComponent | |
![]() | automationParent : DisplayObjectContainer [read-only]
The parent of this component for automation purposes. | UIComponent | |
![]() | automationTabularData : Object [read-only]
An implementation of the IAutomationTabularData interface, which
can be used to retrieve the data. | UIComponent | |
![]() | automationValue : Array [read-only]
This value generally corresponds to the rendered appearance of the
object and should be usable for correlating the identifier with
the object as it appears visually within the application. | UIComponent | |
![]() | automationVisible : Boolean [read-only]
True if this component is visible for automation, false
otherwise. | UIComponent | |
![]() | baseline : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | baselinePosition : Number [override] [read-only]
The y-coordinate of the baseline
of the first line of text of the component. | SkinnableComponent | |
![]() | bottom : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | cacheHeuristic : Boolean [write-only]
Used by Flex to suggest bitmap caching for the object. | UIComponent | |
![]() | cachePolicy : String
Specifies the bitmap caching policy for this object. | UIComponent | |
![]() | className : String [read-only]
The name of this instance's class, such as "Button". | UIComponent | |
columns : IList
The list of GridColumn objectss displayed by this grid. | DataGrid | ||
columnsLength : int [read-only]
Returns the value of columns.length if the columns IList
was specified, otherwise 0. | DataGrid | ||
![]() | contentMouseX : Number [read-only]
Returns the x position of the mouse, in the content coordinate system. | UIComponent | |
![]() | contentMouseY : Number [read-only]
Returns the y position of the mouse, in the content coordinate system. | UIComponent | |
![]() | currentState : String
The current view state of the component. | UIComponent | |
![]() | cursorManager : ICursorManager [read-only]
Gets the CursorManager that controls the cursor for this component
and its peers. | UIComponent | |
dataProvider : IList
A list of data items that correspond to the rows in the grid. | DataGrid | ||
dataProviderLength : int [read-only]
Returns the value of dataProvider.length if the dataProvider IList
was specified, otherwise 0. | DataGrid | ||
dataTipField : String
The name of the field in the data provider to display as the datatip. | DataGrid | ||
dataTipFunction : Function
Specifies a callback function to run on each item of the data provider
to determine its data tip. | DataGrid | ||
![]() | defaultButton : IFlexDisplayObject
The Button control designated as the default button for the container. | SkinnableContainerBase | |
![]() | depth : Number
Determines the order in which items inside of containers
are rendered. | UIComponent | |
![]() | descriptor : UIComponentDescriptor
Reference to the UIComponentDescriptor, if any, that was used
by the createComponentFromDescriptor() method to create this
UIComponent instance. | UIComponent | |
![]() | designLayer : DesignLayer
Specifies the optional DesignLayer instance associated with this visual
element. | UIComponent | |
![]() | document : Object
A reference to the document object associated with this UIComponent. | UIComponent | |
![]() | doubleClickEnabled : Boolean [override]
Specifies whether the UIComponent object receives doubleClick events. | UIComponent | |
editable : Boolean
The default value for the GridColumn editable property, which
indicates if a corresponding cell's data provider item can be edited. | DataGrid | ||
editorColumnIndex : int [read-only]
The zero-based column index of the cell that is being edited. | DataGrid | ||
editorRowIndex : int [read-only]
The zero-based row index of the cell that is being edited. | DataGrid | ||
![]() | enabled : Boolean
Whether the component can accept user interaction. | UIComponent | |
enableIME : Boolean [read-only]
A flag that indicates whether the IME should
be enabled when the component receives focus. | DataGrid | ||
![]() | errorString : String
The text that displayed by a component's error tip when a
component is monitored by a Validator and validation fails. | UIComponent | |
![]() | explicitHeight : Number
Number that specifies the explicit height of the component,
in pixels, in the component's coordinates. | UIComponent | |
![]() | explicitMaxHeight : Number
The maximum recommended height of the component to be considered
by the parent during layout. | UIComponent | |
![]() | explicitMaxWidth : Number
The maximum recommended width of the component to be considered
by the parent during layout. | UIComponent | |
![]() | explicitMinHeight : Number
The minimum recommended height of the component to be considered
by the parent during layout. | UIComponent | |
![]() | explicitMinWidth : Number
The minimum recommended width of the component to be considered
by the parent during layout. | UIComponent | |
![]() | explicitWidth : Number
Number that specifies the explicit width of the component,
in pixels, in the component's coordinates. | UIComponent | |
![]() | flexContextMenu : IFlexContextMenu
The context menu for this UIComponent. | UIComponent | |
![]() | focusEnabled : Boolean
Indicates whether the component can receive focus when tabbed to. | UIComponent | |
![]() | focusManager : IFocusManager
Gets the FocusManager that controls focus for this component
and its peers. | UIComponent | |
![]() | focusPane : Sprite
The focus pane associated with this object. | UIComponent | |
![]() | hasFocusableChildren : Boolean
A flag that indicates whether child objects can receive focus. | UIComponent | |
![]() | hasLayoutMatrix3D : Boolean [read-only]
Contains true if the element has 3D Matrix. | UIComponent | |
![]() | height : Number [override]
Number that specifies the height of the component, in pixels,
in the parent's coordinates. | UIComponent | |
![]() | horizontalCenter : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | id : String
ID of the component. | UIComponent | |
imeMode : String
The default value for the GridColumn imeMode property,
which specifies the IME (Input Method Editor) mode. | DataGrid | ||
![]() | includeInLayout : Boolean
Specifies whether this component is included in the layout of the
parent container. | UIComponent | |
![]() | inheritingStyles : Object
The beginning of this component's chain of inheriting styles. | UIComponent | |
![]() | initialized : Boolean
A flag that determines if an object has been through all three phases
of layout: commitment, measurement, and layout (provided that any were required). | UIComponent | |
![]() | instanceIndex : int [read-only]
The index of a repeated component. | UIComponent | |
![]() | instanceIndices : Array
An Array containing the indices required to reference
this UIComponent object from its parent document. | UIComponent | |
![]() | is3D : Boolean [read-only]
Contains true when the element is in 3D. | UIComponent | |
![]() | isDocument : Boolean [read-only]
Contains true if this UIComponent instance is a document object. | UIComponent | |
![]() | isPopUp : Boolean
Set to true by the PopUpManager to indicate
that component has been popped up. | UIComponent | |
itemEditor : IFactory
The default value for the GridColumn itemEditor property,
which specifies the IGridItemEditor class used to create item editor instances. | DataGrid | ||
itemEditorInstance : IGridItemEditor [read-only]
A reference to the currently active instance of the item editor,
if it exists. | DataGrid | ||
itemRenderer : IFactory
The item renderer that's used for columns that do not specify one. | DataGrid | ||
![]() | layoutMatrix3D : Matrix3D [write-only]
The transform matrix that is used to calculate a component's layout
relative to its siblings. | UIComponent | |
![]() | left : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | maintainProjectionCenter : Boolean
When true, the component keeps its projection matrix centered on the
middle of its bounding box. | UIComponent | |
![]() | maxHeight : Number
The maximum recommended height of the component to be considered
by the parent during layout. | UIComponent | |
![]() | maxWidth : Number
The maximum recommended width of the component to be considered
by the parent during layout. | UIComponent | |
![]() | measuredHeight : Number
The default height of the component, in pixels. | UIComponent | |
![]() | measuredMinHeight : Number
The default minimum height of the component, in pixels. | UIComponent | |
![]() | measuredMinWidth : Number
The default minimum width of the component, in pixels. | UIComponent | |
![]() | measuredWidth : Number
The default width of the component, in pixels. | UIComponent | |
![]() | minHeight : Number
The minimum recommended height of the component to be considered
by the parent during layout. | UIComponent | |
![]() | minWidth : Number
The minimum recommended width of the component to be considered
by the parent during layout. | UIComponent | |
![]() | moduleFactory : IFlexModuleFactory
A module factory is used as context for using embedded fonts and for
finding the style manager that controls the styles for this
component. | UIComponent | |
![]() | mouseFocusEnabled : Boolean
Whether you can receive focus when clicked on. | UIComponent | |
![]() | nestLevel : int
Depth of this object in the containment hierarchy. | UIComponent | |
![]() | nonInheritingStyles : Object
The beginning of this component's chain of non-inheriting styles. | UIComponent | |
![]() | numAutomationChildren : int [read-only]
The number of automation children this container has. | UIComponent | |
![]() | owner : DisplayObjectContainer
The owner of this IVisualElement object. | UIComponent | |
![]() | parent : DisplayObjectContainer [override] [read-only]
The parent container or component for this component. | UIComponent | |
![]() | parentApplication : Object [read-only]
A reference to the Application object that contains this UIComponent
instance. | UIComponent | |
![]() | parentDocument : Object [read-only]
A reference to the parent document object for this UIComponent. | UIComponent | |
![]() | percentHeight : Number
Specifies the height of a component as a percentage
of its parent's size. | UIComponent | |
![]() | percentWidth : Number
Specifies the width of a component as a percentage
of its parent's size. | UIComponent | |
![]() | postLayoutTransformOffsets : TransformOffsets
Defines a set of adjustments that can be applied to the object's
transform in a way that is invisible to its parent's layout. | UIComponent | |
preserveSelection : Boolean
If true, the selection is preserved when the data provider
refreshes its collection. | DataGrid | ||
![]() | processedDescriptors : Boolean
Set to true after immediate or deferred child creation,
depending on which one happens. | UIComponent | |
![]() | repeater : IRepeater [read-only]
A reference to the Repeater object
in the parent document that produced this UIComponent. | UIComponent | |
![]() | repeaterIndex : int [read-only]
The index of the item in the data provider
of the Repeater that produced this UIComponent. | UIComponent | |
![]() | repeaterIndices : Array
An Array containing the indices of the items in the data provider
of the Repeaters in the parent document that produced this UIComponent. | UIComponent | |
![]() | repeaters : Array
An Array containing references to the Repeater objects
in the parent document that produced this UIComponent. | UIComponent | |
requestedColumnCount : int
The measured width of this grid is large enough to display
the first requestedColumnCount columns. | DataGrid | ||
requestedMaxRowCount : int
The measured height of the grid is large enough to display
no more than requestedMaxRowCount rows. | DataGrid | ||
requestedMinColumnCount : int
The measured width of this grid is large enough to display
at least requestedMinColumnCount columns. | DataGrid | ||
requestedMinRowCount : int
The measured height of this grid is large enough to display
at least requestedMinRowCount rows. | DataGrid | ||
requestedRowCount : int
The measured height of this grid is large enough to display
the first requestedRowCount rows. | DataGrid | ||
requireSelection : Boolean
If true and the selectionMode property is not
GridSelectionMode.NONE, an item must always be selected
in the grid. | DataGrid | ||
resizableColumns : Boolean
Indicates whether the user can change the size of the columns. | DataGrid | ||
![]() | right : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | rotation : Number [override] | UIComponent | |
![]() | rotationX : Number [override]
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation
relative to the 3D parent container. | UIComponent | |
![]() | rotationY : Number [override]
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation
relative to the 3D parent container. | UIComponent | |
![]() | rotationZ : Number [override]
| UIComponent | |
rowHeight : Number
If variableRowHeight is false, then
this property specifies the actual height of each row, in pixels. | DataGrid | ||
![]() | scaleX : Number [override]
Number that specifies the horizontal scaling factor. | UIComponent | |
![]() | scaleY : Number [override]
Number that specifies the vertical scaling factor. | UIComponent | |
![]() | scaleZ : Number [override]
Number that specifies the scaling factor along the z axis. | UIComponent | |
![]() | screen : Rectangle [read-only]
Returns an object that contains the size and position of the base
drawing surface for this object. | UIComponent | |
selectedCell : CellPosition
If selectionMode is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS, returns the first
selected cell starting at row 0 column 0 and progressing through each
column in a row before moving to the next row. | DataGrid | ||
selectedCells : Vector.<CellPosition>
If selectionMode is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS, returns a Vector
of CellPosition objects representing the positions of the selected
cells in the grid. | DataGrid | ||
selectedIndex : int
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS, returns the
rowIndex of the first selected row. | DataGrid | ||
selectedIndices : Vector.<int>
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS, returns a Vector of
the selected rows indices. | DataGrid | ||
selectedItem : Object
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS, returns the
item in the the data provider that is currently selected or
undefined if no rows are selected. | DataGrid | ||
selectedItems : Vector.<Object>
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS, returns a Vector of
the dataProvider items that are currently selected. | DataGrid | ||
selectionLength : int [read-only]
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS,
returns the number of selected rows. | DataGrid | ||
selectionMode : String
The selection mode of the control. | DataGrid | ||
showDataTips : Boolean
If true then a dataTip is displayed for all visible cells. | DataGrid | ||
![]() | showInAutomationHierarchy : Boolean
A flag that determines if an automation object
shows in the automation hierarchy. | UIComponent | |
![]() | skin : UIComponent [read-only]
The instance of the skin class for this component instance. | SkinnableComponent | |
sortableColumns : Boolean
Specifies whether the user can interactively sort columns. | DataGrid | ||
![]() | states : Array
The view states that are defined for this component. | UIComponent | |
![]() | styleDeclaration : CSSStyleDeclaration
Storage for the inline inheriting styles on this object. | UIComponent | |
![]() | styleManager : IStyleManager2 [read-only]
Returns the StyleManager instance used by this component. | UIComponent | |
![]() | styleName : Object
The class style used by this component. | UIComponent | |
![]() | styleParent : IAdvancedStyleClient
A component's parent is used to evaluate descendant selectors. | UIComponent | |
![]() | suggestedFocusSkinExclusions : Array [read-only]
Lists the skin parts that are
excluded from bitmaps captured and used to
show focus. | SkinnableComponent | |
![]() | systemManager : ISystemManager
Returns the SystemManager object used by this component. | UIComponent | |
![]() | tabFocusEnabled : Boolean
A flag that indicates whether this object can receive focus
via the TAB key
This is similar to the tabEnabled property
used by the Flash Player.
This is usually true for components that
handle keyboard input, but some components in controlbars
have them set to false because they should not steal
focus from another component like an editor. | UIComponent | |
![]() | toolTip : String
Text to display in the ToolTip. | UIComponent | |
![]() | top : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | transform : Transform [override]
An object with properties pertaining to a display object's matrix, color transform,
and pixel bounds. | UIComponent | |
![]() | transformX : Number
Sets the x coordinate for the transform center of the component. | UIComponent | |
![]() | transformY : Number
Sets the y coordinate for the transform center of the component. | UIComponent | |
![]() | transformZ : Number
Sets the z coordinate for the transform center of the component. | UIComponent | |
![]() | transitions : Array
An Array of Transition objects, where each Transition object defines a
set of effects to play when a view state change occurs. | UIComponent | |
![]() | tweeningProperties : Array
Array of properties that are currently being tweened on this object. | UIComponent | |
typicalItem : Object
The grid's layout ensures that columns whose width is not specified is wide
enough to display an item renderer for this default data provider item. | DataGrid | ||
![]() | uid : String
A unique identifier for the object. | UIComponent | |
![]() | updateCompletePendingFlag : Boolean
A flag that determines if an object has been through all three phases
of layout validation (provided that any were required). | UIComponent | |
![]() | validationSubField : String
Used by a validator to associate a subfield with this component. | UIComponent | |
variableRowHeight : Boolean
If true, each row's height is the maximum of
preferred heights of the cells displayed so far. | DataGrid | ||
![]() | verticalCenter : Object
For components, this layout constraint property is a
facade on top of the similarly-named style. | UIComponent | |
![]() | visible : Boolean [override]
Whether or not the display object is visible. | UIComponent | |
![]() | width : Number [override]
Number that specifies the width of the component, in pixels,
in the parent's coordinates. | UIComponent | |
![]() | x : Number [override]
Number that specifies the component's horizontal position,
in pixels, within its parent container. | UIComponent | |
![]() | y : Number [override]
Number that specifies the component's vertical position,
in pixels, within its parent container. | UIComponent | |
![]() | z : Number [override]
| UIComponent |
Method | Defined By | ||
---|---|---|---|
DataGrid()
Constructor. | DataGrid | ||
addSelectedCell(rowIndex:int, columnIndex:int):Boolean
If selectionMode
is GridSelectionMode.SINGLE_CELL or
GridSelectionMode.MULTIPLE_CELLS, adds the cell to
the selection and sets the caret position to the cell. | DataGrid | ||
addSelectedIndex(rowIndex:int):Boolean
If selectionMode
is GridSelectionMode.MULTIPLE_ROWS, adds this row to
the selection and sets the caret position to this row. | DataGrid | ||
![]() | addStyleClient(styleClient:IAdvancedStyleClient):void
Adds a non-visual style client to this component instance. | UIComponent | |
![]() | callLater(method:Function, args:Array = null):void
Queues a function to be called later. | UIComponent | |
clearSelection():Boolean
Removes all of the selected rows and cells, if selectionMode
is not GridSelectionMode.NONE. | DataGrid | ||
![]() | clearStyle(styleProp:String):void
Deletes a style property from this component instance. | UIComponent | |
![]() | contentToGlobal(point:Point):Point
Converts a Point object from content coordinates to global coordinates. | UIComponent | |
![]() | contentToLocal(point:Point):Point
Converts a Point object from content to local coordinates. | UIComponent | |
![]() | createAutomationIDPart(child:IAutomationObject):Object
Returns a set of properties that identify the child within
this container. | UIComponent | |
![]() | createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object
Returns a set of properties as automation IDs that identify the child within
this container. | UIComponent | |
![]() | createReferenceOnParentDocument(parentDocument:IFlexDisplayObject):void
Creates an id reference to this IUIComponent object
on its parent document object. | UIComponent | |
![]() | deleteReferenceOnParentDocument(parentDocument:IFlexDisplayObject):void
Deletes the id reference to this IUIComponent object
on its parent document object. | UIComponent | |
![]() |
Returns a UITextFormat object corresponding to the text styles
for this UIComponent. | UIComponent | |
![]() | dispatchEvent(event:Event):Boolean [override]
Dispatches an event into the event flow. | UIComponent | |
![]() | drawFocus(isFocused:Boolean):void
Shows or hides the focus indicator around this component. | UIComponent | |
![]() | drawRoundRect(x:Number, y:Number, w:Number, h:Number, r:Object = null, c:Object = null, alpha:Object = null, rot:Object = null, gradient:String = null, ratios:Array = null, hole:Object = null):void
Programmatically draws a rectangle into this skin's Graphics object. | UIComponent | |
![]() | effectFinished(effectInst:IEffectInstance):void
Called by the effect instance when it stops playing on the component. | UIComponent | |
![]() | effectStarted(effectInst:IEffectInstance):void
Called by the effect instance when it starts playing on the component. | UIComponent | |
![]() | endEffectsStarted():void
Ends all currently playing effects on the component. | UIComponent | |
endItemEditorSession(cancel:Boolean = false):Boolean
Closes the currently active editor and optionally saves the editor's value
by calling the item editor's save() method. | DataGrid | ||
ensureCellIsVisible(rowIndex:int, columnIndex:int = -1):void
If necessary, set the verticalScrollPosition and
horizontalScrollPosition properties so that the
specified cell is completely visible. | DataGrid | ||
![]() | executeBindings(recurse:Boolean = false):void
Executes all the bindings for which the UIComponent object is the destination. | UIComponent | |
![]() | finishPrint(obj:Object, target:IFlexDisplayObject):void
Called after printing is complete. | UIComponent | |
![]() | getAutomationChildAt(index:int):IAutomationObject
Provides the automation object at the specified index. | UIComponent | |
![]() | getAutomationChildren():Array
Provides the automation object list . | UIComponent | |
![]() | getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Returns the x coordinate of the element's bounds at the specified element size. | UIComponent | |
![]() | getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Returns the y coordinate of the element's bounds at the specified element size. | UIComponent | |
![]() | getClassStyleDeclarations():Array
Finds the type selectors for this UIComponent instance. | UIComponent | |
![]() | getConstraintValue(constraintName:String):*
Returns a layout constraint value, which is the same as
getting the constraint style for this component. | UIComponent | |
![]() | getExplicitOrMeasuredHeight():Number
A convenience method for determining whether to use the
explicit or measured height
| UIComponent | |
![]() | getExplicitOrMeasuredWidth():Number
A convenience method for determining whether to use the
explicit or measured width
| UIComponent | |
![]() | getFocus():InteractiveObject
Gets the object that currently has focus. | UIComponent | |
![]() | getLayoutBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's layout height. | UIComponent | |
![]() | getLayoutBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's layout width. | UIComponent | |
![]() | getLayoutBoundsX(postLayoutTransform:Boolean = true):Number
Returns the x coordinate that the element uses to draw on screen. | UIComponent | |
![]() | getLayoutBoundsY(postLayoutTransform:Boolean = true):Number
Returns the y coordinate that the element uses to draw on screen. | UIComponent | |
![]() | getLayoutMatrix():Matrix
Returns the transform matrix that is used to calculate the component's
layout relative to its siblings. | UIComponent | |
![]() | getLayoutMatrix3D():Matrix3D
Returns the layout transform Matrix3D for this element. | UIComponent | |
![]() | getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's maximum height. | UIComponent | |
![]() | getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's maximum width. | UIComponent | |
![]() | getMinBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's minimum height. | UIComponent | |
![]() | getMinBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's minimum width. | UIComponent | |
![]() | getPreferredBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's preferred height. | UIComponent | |
![]() | getPreferredBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's preferred width. | UIComponent | |
![]() | getRepeaterItem(whichRepeater:int = -1):Object
Returns the item in the dataProvider that was used
by the specified Repeater to produce this Repeater, or
null if this Repeater isn't repeated. | UIComponent | |
![]() | getStyle(styleProp:String):*
Gets a style property that has been set anywhere in this
component's style lookup chain. | UIComponent | |
![]() | globalToContent(point:Point):Point
Converts a Point object from global to content coordinates. | UIComponent | |
![]() | hasCSSState():Boolean
Returns true if currentCSSState is not null. | UIComponent | |
![]() | hasState(stateName:String):Boolean
Determines whether the specified state has been defined on this
UIComponent. | UIComponent | |
![]() | horizontalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix
Returns a box Matrix which can be passed to the
drawRoundRect() method
as the rot parameter when drawing a horizontal gradient. | UIComponent | |
![]() | initialize():void
Initializes the internal structure of this component. | UIComponent | |
![]() | initializeRepeaterArrays(parent:IRepeaterClient):void
Initializes various properties which keep track of repeated instances
of this component. | UIComponent | |
invalidateCell(rowIndex:int, columnIndex:int):void
If the specified cell is visible, it is redisplayed. | DataGrid | ||
![]() | invalidateDisplayList():void
Marks a component so that its updateDisplayList()
method gets called during a later screen update. | UIComponent | |
![]() | invalidateLayering():void
Called by a component's items to indicate that their depth
property has changed. | UIComponent | |
![]() | invalidateLayoutDirection():void
An element must call this method when its layoutDirection changes or
when its parent's layoutDirection changes. | UIComponent | |
![]() | invalidateProperties():void
Marks a component so that its commitProperties()
method gets called during a later screen update. | UIComponent | |
![]() | invalidateSize():void
Marks a component so that its measure()
method gets called during a later screen update. | UIComponent | |
![]() | invalidateSkinState():void
Marks the component so that the new state of the skin is set
during a later screen update. | SkinnableComponent | |
invalidateTypicalItem():void | DataGrid | ||
![]() | localToContent(point:Point):Point
Converts a Point object from local to content coordinates. | UIComponent | |
![]() | matchesCSSState(cssState:String):Boolean
Returns true if cssState matches currentCSSState. | UIComponent | |
![]() | matchesCSSType(cssType:String):Boolean
Determines whether this instance is the same as, or is a subclass of,
the given type. | UIComponent | |
![]() | measureHTMLText(htmlText:String):TextLineMetrics
Measures the specified HTML text, which can contain HTML tags such
as <font> and <b>,
assuming that it is displayed
in a single-line UITextField using a UITextFormat
determined by the styles of this UIComponent. | UIComponent | |
![]() | measureText(text:String):TextLineMetrics
Measures the specified text, assuming that it is displayed
in a single-line UITextField (or UIFTETextField) using a UITextFormat
determined by the styles of this UIComponent. | UIComponent | |
![]() | move(x:Number, y:Number):void
Moves the component to a specified position within its parent. | UIComponent | |
![]() | notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void
Propagates style changes to the children. | UIComponent | |
![]() | owns(child:DisplayObject):Boolean
Returns true if the chain of owner properties
points from child to this UIComponent. | UIComponent | |
![]() | parentChanged(p:DisplayObjectContainer):void
Called by Flex when a UIComponent object is added to or removed from a parent. | UIComponent | |
![]() | prepareToPrint(target:IFlexDisplayObject):Object
Prepares an IFlexDisplayObject for printing. | UIComponent | |
![]() | regenerateStyleCache(recursive:Boolean):void
Builds or rebuilds the CSS style cache for this component
and, if the recursive parameter is true,
for all descendants of this component as well. | UIComponent | |
![]() | registerEffects(effects:Array):void
For each effect event, registers the EffectManager
as one of the event listeners. | UIComponent | |
removeSelectedCell(rowIndex:int, columnIndex:int):Boolean
If selectionMode
is GridSelectionMode.SINGLE_CELL or
GridSelectionMode.MULTIPLE_CELLS, removes the cell
from the selection and sets the caret position to the cell. | DataGrid | ||
removeSelectedIndex(rowIndex:int):Boolean
If selectionMode
is GridSelectionMode.SINGLE_ROW or
GridSelectionMode.MULTIPLE_ROWS, removes this row
from the selection and sets the caret position to this row. | DataGrid | ||
![]() | removeStyleClient(styleClient:IAdvancedStyleClient):void
Removes a non-visual style client from this component instance. | UIComponent | |
![]() | replayAutomatableEvent(event:Event):Boolean
Replays the specified event. | UIComponent | |
![]() | resolveAutomationIDPart(criteria:Object):Array
Resolves a child by using the id provided. | UIComponent | |
![]() | resumeBackgroundProcessing():void [static]
Resumes the background processing of methods
queued by callLater(), after a call to
suspendBackgroundProcessing(). | UIComponent | |
selectAll():Boolean
If selectionMode is
GridSelectionMode.MULTIPLE_ROWS, selects all rows and
removes the caret or if selectionMode is
GridSelectionMode.MULTIPLE_CELLS selects all cells
and removes the caret. | DataGrid | ||
selectCellRegion(rowIndex:int, columnIndex:int, rowCount:uint, columnCount:uint):Boolean
If selectionMode is GridSelectionMode.MULTIPLE_CELLS,
sets the selection to all the cells in the cell region and the
caret position to the last cell in the cell region. | DataGrid | ||
selectIndices(rowIndex:int, rowCount:int):Boolean
If selectionMode is GridSelectionMode.MULTIPLE_ROWS,
sets the selection to the specfied rows and the caret position to
endRowIndex. | DataGrid | ||
selectionContainsCell(rowIndex:int, columnIndex:int):Boolean
If selectionMode is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS, returns true
if the cell is in the current selection. | DataGrid | ||
selectionContainsCellRegion(rowIndex:int, columnIndex:int, rowCount:int, columnCount:int):Boolean
If selectionMode is
GridSelectionMode.MULTIPLE_CELLS, returns true
if the cells in the cell region are in the current selection. | DataGrid | ||
selectionContainsIndex(rowIndex:int):Boolean
If selectionMode is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS, returns true
if the row at index is in the current selection. | DataGrid | ||
selectionContainsIndices(rowIndices:Vector.<int>):Boolean
If selectionMode is
GridSelectionMode.MULTIPLE_ROWS, returns true
if the rows in indices are in the current selection. | DataGrid | ||
![]() | setActualSize(w:Number, h:Number):void
Sizes the object. | UIComponent | |
![]() | setConstraintValue(constraintName:String, value:*):void
Sets a layout constraint value, which is the same as
setting the constraint style for this component. | UIComponent | |
![]() | setCurrentState(stateName:String, playTransition:Boolean = true):void
Set the current state. | UIComponent | |
![]() | setFocus():void
Sets the focus to this component. | UIComponent | |
![]() | setLayoutBoundsPosition(x:Number, y:Number, postLayoutTransform:Boolean = true):void
Sets the coordinates that the element uses to draw on screen. | UIComponent | |
![]() | setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void
Sets the layout size of the element. | UIComponent | |
![]() | setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
Sets the transform Matrix that is used to calculate the component's layout
size and position relative to its siblings. | UIComponent | |
![]() | setLayoutMatrix3D(value:Matrix3D, invalidateLayout:Boolean):void
Sets the transform Matrix3D that is used to calculate the component's layout
size and position relative to its siblings. | UIComponent | |
setSelectedCell(rowIndex:int, columnIndex:int):Boolean
If selectionMode
is GridSelectionMode.SINGLE_CELL or
GridSelectionMode.MULTIPLE_CELLS, sets the selection
and the caret position to this cell. | DataGrid | ||
setSelectedIndex(rowIndex:int):Boolean
If selectionMode
is GridSelectionMode.SINGLE_ROW or
GridSelectionMode.MULTIPLE_ROWS, sets the selection and
the caret position to this row. | DataGrid | ||
![]() | setStyle(styleProp:String, newValue:*):void
Sets a style property on this component instance. | UIComponent | |
![]() | setVisible(value:Boolean, noEvent:Boolean = false):void
Called when the visible property changes. | UIComponent | |
sortByColumns(columnIndices:Vector.<int>, isInteractive:Boolean = false):Boolean
Sort the DataGrid by one or more columns, and refresh the display. | DataGrid | ||
startItemEditorSession(rowIndex:int, columnIndex:int):Boolean
Starts an editor session on a selected cell in the grid. | DataGrid | ||
![]() | styleChanged(styleProp:String):void
Detects changes to style properties. | UIComponent | |
![]() | stylesInitialized():void
Flex calls the stylesInitialized() method when
the styles for a component are first initialized. | UIComponent | |
![]() | suspendBackgroundProcessing():void [static]
Blocks the background processing of methods
queued by callLater(),
until resumeBackgroundProcessing() is called. | UIComponent | |
![]() | toString():String [override]
Returns a string indicating the location of this object
within the hierarchy of DisplayObjects in the Application. | FlexSprite | |
![]() | transformAround(transformCenter:Vector3D, scale:Vector3D = null, rotation:Vector3D = null, translation:Vector3D = null, postLayoutScale:Vector3D = null, postLayoutRotation:Vector3D = null, postLayoutTranslation:Vector3D = null, invalidateLayout:Boolean = true):void
A utility method to update the rotation, scale, and translation of the
transform while keeping a particular point, specified in the component's
own coordinate space, fixed in the parent's coordinate space. | UIComponent | |
![]() | transformPointToParent(localPosition:Vector3D, position:Vector3D, postLayoutPosition:Vector3D):void
A utility method to transform a point specified in the local
coordinates of this object to its location in the object's parent's
coordinates. | UIComponent | |
![]() | validateDisplayList():void
Validates the position and size of children and draws other
visuals. | UIComponent | |
![]() | validateNow():void
Validate and update the properties and layout of this object
and redraw it, if necessary. | UIComponent | |
![]() | validateProperties():void
Used by layout logic to validate the properties of a component
by calling the commitProperties() method. | UIComponent | |
![]() | validateSize(recursive:Boolean = false):void
Validates the measured size of the component
If the LayoutManager.invalidateSize() method is called with
this ILayoutManagerClient, then the validateSize() method
is called when it's time to do measurements. | UIComponent | |
![]() | validationResultHandler(event:ValidationResultEvent):void
Handles both the valid and invalid events from a
validator assigned to this component. | UIComponent | |
![]() | verticalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix
Returns a box Matrix which can be passed to drawRoundRect()
as the rot parameter when drawing a vertical gradient. | UIComponent |
Method | Defined By | ||
---|---|---|---|
![]() | adjustFocusRect(obj:DisplayObject = null):void
Adjust the focus rectangle. | UIComponent | |
![]() | applyComputedMatrix():void
Commits the computed matrix built from the combination of the layout
matrix and the transform offsets to the flash displayObject's transform. | UIComponent | |
![]() | attachOverlay():void
This is an internal method used by the Flex framework
to support the Dissolve effect. | UIComponent | |
![]() | attachSkin():void
Create the skin for the component. | SkinnableComponent | |
![]() | canSkipMeasurement():Boolean
Determines if the call to the measure() method can be skipped. | UIComponent | |
![]() | childrenCreated():void
Performs any final processing after child objects are created. | UIComponent | |
![]() | clearSkinParts():void
Clear out references to skin parts. | SkinnableComponent | |
commitCaretPosition(newCaretRowIndex:int, newCaretColumnIndex:int):void
Updates the grid's caret position. | DataGrid | ||
commitInteractiveSelection(selectionEventKind:String, rowIndex:int, columnIndex:int, rowCount:int = 1, columnCount:int = 1):Boolean
In response to user input (mouse or keyboard) which changes the
selection, this method dispatches the selectionChanging event. | DataGrid | ||
![]() | commitProperties():void
Processes the properties set on the component. | UIComponent | |
![]() | createChildren():void
Create child objects of the component. | UIComponent | |
![]() | createDynamicPartInstance(partName:String):Object
Create an instance of a dynamic skin part. | SkinnableComponent | |
![]() | createInFontContext(classObj:Class):Object
Creates a new object using a context
based on the embedded font being used. | UIComponent | |
![]() | createInModuleContext(moduleFactory:IFlexModuleFactory, className:String):Object
Creates the object using a given moduleFactory. | UIComponent | |
![]() | detachSkin():void
Destroys and removes the skin for this component. | SkinnableComponent | |
![]() | dispatchPropertyChangeEvent(prop:String, oldValue:*, value:*):void
Helper method for dispatching a PropertyChangeEvent
when a property is updated. | UIComponent | |
![]() | findSkinParts():void
Find the skin parts in the skin class and assign them to the properties of the component. | SkinnableComponent | |
![]() | focusInHandler(event:FocusEvent):void
The event handler called when a UIComponent object gets focus. | UIComponent | |
![]() | focusOutHandler(event:FocusEvent):void
The event handler called when a UIComponent object loses focus. | UIComponent | |
![]() | getCurrentSkinState():String [override]
Returns the name of the state to be applied to the skin. | SkinnableContainerBase | |
![]() | getDynamicPartAt(partName:String, index:int):Object
Returns a specific instance of a dynamic part. | SkinnableComponent | |
![]() | initAdvancedLayoutFeatures():void
Initializes the implementation and storage of some of the less frequently
used advanced layout features of a component. | UIComponent | |
![]() | initializationComplete():void
Finalizes the initialization of this component. | UIComponent | |
![]() | initializeAccessibility():void
Initializes this component's accessibility code. | UIComponent | |
![]() |
Helper method to invalidate parent size and display list if
this object affects its layout (includeInLayout is true). | UIComponent | |
![]() | isOurFocus(target:DisplayObject):Boolean
Typically overridden by components containing UITextField objects,
where the UITextField object gets focus. | UIComponent | |
![]() | keyDownHandler(event:KeyboardEvent):void
The event handler called for a keyDown event. | UIComponent | |
![]() | keyUpHandler(event:KeyboardEvent):void
The event handler called for a keyUp event. | UIComponent | |
![]() | measure():void
Calculates the default size, and optionally the default minimum size,
of the component. | UIComponent | |
![]() | numDynamicParts(partName:String):int
Returns the number of instances of a dynamic part. | SkinnableComponent | |
![]() | partAdded(partName:String, instance:Object):void
Called when a skin part is added. | SkinnableComponent | |
![]() | partRemoved(partName:String, instance:Object):void
Called when an instance of a skin part is being removed. | SkinnableComponent | |
![]() | removeDynamicPartInstance(partName:String, instance:Object):void
Remove an instance of a dynamic part. | SkinnableComponent | |
![]() | resourcesChanged():void
This method is called when a UIComponent is constructed,
and again whenever the ResourceManager dispatches
a "change" Event to indicate
that the localized resources have changed in some way. | UIComponent | |
![]() | setStretchXY(stretchX:Number, stretchY:Number):void
Specifies a transform stretch factor in the horizontal and vertical direction. | UIComponent | |
![]() | stateChanged(oldState:String, newState:String, recursive:Boolean):void
This method is called when a state changes to check whether
state-specific styles apply to this component. | UIComponent | |
![]() | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Draws the object and/or sizes and positions its children. | UIComponent |
Event | Summary | Defined By | ||
---|---|---|---|---|
![]() | Dispatched when the component is added to a container as a content child by using the addChild(), addChildAt(), addElement(), or addElementAt() method. | UIComponent | ||
Dispatched by the grid skin part when the caret position, size, or visibility has changed due to user interaction or being programmatically set. | DataGrid | |||
![]() | Dispatched when the component has finished its construction, property processing, measuring, layout, and drawing. | UIComponent | ||
![]() | Dispatched after the view state has changed. | UIComponent | ||
![]() | Dispatched after the currentState property changes, but before the view state changes. | UIComponent | ||
![]() | Dispatched by the drag initiator (the component that is the source of the data being dragged) when the drag operation completes, either when you drop the dragged data onto a drop target or when you end the drag-and-drop operation without performing a drop. | UIComponent | ||
![]() | Dispatched by the drop target when the user releases the mouse over it. | UIComponent | ||
![]() | Dispatched by a component when the user moves the mouse over the component during a drag operation. | UIComponent | ||
![]() | Dispatched by the component when the user drags outside the component, but does not drop the data onto the target. | UIComponent | ||
![]() | Dispatched by a component when the user moves the mouse while over the component during a drag operation. | UIComponent | ||
![]() | Dispatched by the drag initiator when starting a drag operation. | UIComponent | ||
![]() | Dispatched after an effect ends. | UIComponent | ||
![]() | Dispatched just before an effect starts. | UIComponent | ||
![]() | Dispatched after an effect is stopped, which happens only by a call to stop() on the effect. | UIComponent | ||
![]() | Dispatched after the component has entered a view state. | UIComponent | ||
![]() | Dispatched just before the component exits a view state. | UIComponent | ||
Dispatched by the grid skin part when the mouse is clicked over a cell. | DataGrid | |||
Dispatched by the grid skin part when the mouse is double-clicked over a cell. | DataGrid | |||
Dispatched after the item editor has been closed without saving its data. | DataGrid | |||
Dispatched after the data in item editor has been saved into the data provider and the editor has been closed. | DataGrid | |||
Dispatched immediately after an item editor has been opened. | DataGrid | |||
Dispatched when a new item editor session has been requested. | DataGrid | |||
Dispatched by the grid skin part when the mouse button is pressed over a grid cell. | DataGrid | |||
Dispatched by the grid skin part after a gridMouseDown event if the mouse moves before the button is released. | DataGrid | |||
Dispatched by the grid skin part after a gridMouseDown event when the mouse button is released, even if the mouse is no longer within the grid. | DataGrid | |||
Dispatched by the grid skin part when the mouse leaves a grid cell. | DataGrid | |||
Dispatched by the grid skin part when the mouse enters a grid cell. | DataGrid | |||
![]() | Dispatched when an object's state changes from visible to invisible. | UIComponent | ||
![]() | Dispatched when the component has finished its construction and has all initialization properties set. | UIComponent | ||
![]() | Dispatched when a component is monitored by a Validator and the validation failed. | UIComponent | ||
![]() | Dispatched from a component opened using the PopUpManager when the user clicks outside it. | UIComponent | ||
![]() | Dispatched from a component opened using the PopUpManager when the user scrolls the mouse wheel outside it. | UIComponent | ||
![]() | Dispatched when the object has moved. | UIComponent | ||
![]() | Dispatched at the beginning of the component initialization sequence. | UIComponent | ||
![]() | Dispatched when the component is removed from a container as a content child by using the removeChild(), removeChildAt(), removeElement(), or removeElementAt() method. | UIComponent | ||
![]() | Dispatched when the component is resized. | UIComponent | ||
Dispatched when the selection has changed. | DataGrid | |||
Dispatched when the selection is going to change. | DataGrid | |||
![]() | Dispatched when an object's state changes from invisible to visible. | UIComponent | ||
Dispatched after the sort has been applied to the data provider's collection. | DataGrid | |||
Dispatched before the sort has been applied to the data provider's collection. | DataGrid | |||
![]() | Dispatched after the component has entered a new state and any state transition animation to that state has finished playing. | UIComponent | ||
![]() | Dispatched when a component interrupts a transition to its current state in order to switch to a new state. | UIComponent | ||
![]() | Dispatched by the component when it is time to create a ToolTip. | UIComponent | ||
![]() | Dispatched by the component when its ToolTip has been hidden and is to be discarded soon. | UIComponent | ||
![]() | Dispatched by the component when its ToolTip is about to be hidden. | UIComponent | ||
![]() | Dispatched by the component when its ToolTip is about to be shown. | UIComponent | ||
![]() | Dispatched by the component when its ToolTip has been shown. | UIComponent | ||
![]() | Dispatched by a component whose toolTip property is set, as soon as the user moves the mouse over it. | UIComponent | ||
![]() | A non-cancellable event, dispatched by a component when it is done responding to a touch interaction user gesture. | UIComponent | ||
![]() | A non-cancellable event, dispatched by a component when it starts responding to a touch interaction user gesture. | UIComponent | ||
![]() | A cancellable event, dispatched by a component in an attempt to respond to a touch interaction user gesture. | UIComponent | ||
![]() | Dispatched when an object has had its commitProperties(), measure(), and updateDisplayList() methods called (if needed). | UIComponent | ||
![]() | Dispatched when a component is monitored by a Validator and the validation succeeded. | UIComponent | ||
![]() | Dispatched when values are changed programmatically or by user interaction. | UIComponent |
Style | Description | Defined By | ||
---|---|---|---|---|
alignmentBaseline | Type: String CSS Inheritance: yes Specifies the baseline to which the dominant baseline aligns. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.alignmentBaseline For the Mobile theme, this is not supported. See also | DataGrid | ||
alternatingRowColors | Type: Array Format: Color CSS Inheritance: no Theme: spark Used to initialize the DataGrid's rowBackground skin part.
If the alternatingRowColors style is specified,
then use the alternatingRowColorsBackground skin part
as the value of the rowBackground skin part.
The alternating colors for the grid rows are defined by
successive entries in the Array value of this style.
If you want to change how this style is rendered,
replace the undefined . | DataGrid | ||
![]() | Type: String CSS Inheritance: no The vertical distance in pixels from the top edge of the content area to the control's baseline position. | UIComponent | ||
baselineShift | Type: Object CSS Inheritance: yes Amount to shift the baseline. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.baselineShift. For the Mobile theme, this is not supported. See also | DataGrid | ||
borderAlpha | Type: Number CSS Inheritance: no Theme: spark The alpha value of the border for this component. Valid values are 0.0 to 1.0. The default value is 1.0 . | DataGrid | ||
borderColor | Type: uint Format: Color CSS Inheritance: no Theme: spark The color of the border for this component. The default value is #696969 . | DataGrid | ||
borderVisible | Type: Boolean CSS Inheritance: no Theme: spark Controls the visibility of the border for this component. The default value is true . | DataGrid | ||
![]() | Type: String CSS Inheritance: no The vertical distance, in pixels, from the bottom edge of the component to the bottom edge of its parent container's content area. | UIComponent | ||
caretColor | Type: uint Format: Color CSS Inheritance: yes Theme: spark Color of the caret indicator when navigating the Grid. The default value is 0x0167FF . | DataGrid | ||
cffHinting | Type: String CSS Inheritance: yes The type of CFF hinting used for this text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.cffHinting. For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: uint Format: Color CSS Inheritance: yes Theme: spark, mobile The main color for a component. | SkinnableComponent | ||
color | Type: uint Format: Color CSS Inheritance: yes Color of the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.color. For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style color, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style color. The default value is 0x000000 .See also | DataGrid | ||
contentBackgroundAlpha | Type: Number CSS Inheritance: yes Theme: spark The alpha of the content background for this component. Valid values are 0.0 to 1.0. | DataGrid | ||
contentBackgroundColor | Type: uint Format: Color CSS Inheritance: yes Theme: spark The color of the content background for this component. For a List, changing The default value for the Spark theme is | DataGrid | ||
defaultDataGridItemEditor | Type: Class CSS Inheritance: no The class to use as the item editor, if one is not specified by a column. This style property lets you set an item editor for a group of DataGrid controls instead of having to set each one individually. The DataGridColumn.itemEditor property supercedes this value.
The default value is null . | DataGrid | ||
digitCase | Type: String CSS Inheritance: yes The type of digit case used for this text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.digitCase. For the Mobile theme, this is not supported. See also | DataGrid | ||
digitWidth | Type: String CSS Inheritance: yes Type of digit width used for this text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.digitWidth. For the Mobile theme, this is not supported. See also | DataGrid | ||
direction | Type: String CSS Inheritance: yes Specifies the default bidirectional embedding level of the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.direction. For the Mobile theme, this is not supported. See also | DataGrid | ||
dominantBaseline | Type: String CSS Inheritance: yes Specifies which element baseline snaps to the alignmentBaseline to
determine the vertical position of the element on the line.
For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.dominantBaseline. For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: uint Format: Color CSS Inheritance: yes Color of the component highlight when validation fails. | UIComponent | ||
![]() | Type: Class Name of the skin class to use for this component when a validation error occurs. | SkinnableComponent | ||
![]() | Type: Class CSS Inheritance: no Skin used to draw the focus rectangle. | UIComponent | ||
fontFamily | Type: String CSS Inheritance: yes The name of the font to use, or a comma-separated list of font names. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.fontFamily. For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style fontFamily, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style fontFamily. The default value for the Spark theme is See also | DataGrid | ||
fontLookup | Type: String CSS Inheritance: yes Font lookup to use. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.fontLookup For the Mobile theme, this is not supported. See also | DataGrid | ||
fontSize | Type: Number Format: Length CSS Inheritance: yes Height of the text, in pixels. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.fontSize For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style fontSize, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style fontSize. The default value for the Spark theme is See also | DataGrid | ||
fontStyle | Type: String CSS Inheritance: yes Determines whether the text is italic font. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.fontStyle For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style fontStyle, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style fontStyle. See also | DataGrid | ||
fontWeight | Type: String CSS Inheritance: yes Determines whether the text is boldface. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.fontWeight For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style fontWeight, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style fontWeight. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: no The horizontal distance in pixels from the center of the component's content area to the center of the component. | UIComponent | ||
horizontalScrollPolicy | Type: String CSS Inheritance: no Indicates the conditions for which the horizontal scroll bar is displayed.
The scroll policy affects the measured size of the scroller skin part.
This style is a reference to the scroller skin part's
ScrollPolicy.AUTO .See also | DataGrid | ||
![]() | Type: String CSS Inheritance: yes The primary interaction mode for this component. See also | UIComponent | ||
justificationRule | Type: String CSS Inheritance: yes Rule used to justify text in a paragraph. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.justificationRule For the Mobile theme, this is not supported. See also | DataGrid | ||
justificationStyle | Type: String CSS Inheritance: yes The style used for justification of the paragraph. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.justificationStyle For the Mobile theme, this is not supported. See also | DataGrid | ||
kerning | Type: String CSS Inheritance: yes The style used for justification of the paragraph. Kerning is enabled by default for Spark components, but is disabled by default for MX components.
Spark components interpret For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.kerning For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: yes Specifies the desired layout direction of a component. See also | UIComponent | ||
leading | Type: Number Format: Length CSS Inheritance: yes Theme: mobile Additional vertical space between lines of text.
For the Spark theme, this is not supported. See For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableStageText Style fontWeight and if using StyleableStageText, this is not supported. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: no The horizontal distance, in pixels, from the left edge of the component to the left edge of its parent container's content area. | UIComponent | ||
letterSpacing | Type: Number CSS Inheritance: yes Theme: mobile The number of additional pixels to appear between each character.
For the Spark theme, this is not supported. See For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField.letterSpacing and if using StyleableStageText, this is not supported. See also | DataGrid | ||
ligatureLevel | Type: String CSS Inheritance: yes Controls which of the ligatures that are defined in the font may be used in the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.ligatureLevel For the Mobile theme, this is not supported. See also | DataGrid | ||
lineHeight | Type: Object CSS Inheritance: yes Leading controls for the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.lineHeight.
For the Mobile theme, this is not supported. See See also | DataGrid | ||
lineThrough | Type: Boolean CSS Inheritance: yes If true, applies strikethrough, a line drawn through the middle of the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.lineThrough For the Mobile theme, this is not supported. See also | DataGrid | ||
locale | Type: String CSS Inheritance: yes The locale of the text. Controls case transformations and shaping. Uses standard locale identifiers as described in Unicode Technical Standard #35. For example "en", "en_US" and "en-US" are all English, "ja" is Japanese. The default value is undefined. This property inherits its value from an ancestor; if
still undefined, it inherits from the global When using the Spark formatters and globalization classes, you can set this style on the
root application to the value of the undefined .See also | DataGrid | ||
renderingMode | Type: String CSS Inheritance: yes The rendering mode used for this text which applies only to embedded fonts. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.renderingMode For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: no The horizontal distance, in pixels, from the right edge of the component to the right edge of its parent container's content area. | UIComponent | ||
rollOverColor | Type: uint Format: Color CSS Inheritance: yes Theme: spark Color of the highlights when the mouse is over the component. This style is only applicable in mouse 0xCEDBEF . | DataGrid | ||
selectionColor | Type: uint Format: Color CSS Inheritance: yes Theme: spark, mobile The color of the background of a renderer when the user selects it. The default value for the Halo theme is | DataGrid | ||
![]() | Type: Boolean CSS Inheritance: yes Show the error border or skin when this component is invalid. | UIComponent | ||
![]() | Type: Boolean CSS Inheritance: yes Show the error tip when this component is invalid and the user rolls over it. | UIComponent | ||
![]() | Type: Class Name of the skin class to use for this component. | SkinnableComponent | ||
stretchCursor | Type: Class CSS Inheritance: no The class to use as the skin for the cursor that indicates that a column can be resized. The default value is the cursorStretch symbol from the Assets.swf file.
| DataGrid | ||
symbolColor | Type: uint Format: Color CSS Inheritance: yes Theme: spark, mobile Color of any symbol of a component. Examples include the check mark of a CheckBox or the arrow of a scroll button. The default value is 0x000000 . | DataGrid | ||
textAlign | Type: String CSS Inheritance: yes Alignment of text within a container. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.textAlign For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style textAlign, and if using StyleableStageText, see spark.components.supportClasses.StyleableStageText Style textAlign. See also | DataGrid | ||
textAlignLast | Type: String CSS Inheritance: yes Alignment of the last line in the paragraph relative to the container in justified text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.textAlignLast For the Mobile theme, this is not supported. See also | DataGrid | ||
textAlpha | Type: Number CSS Inheritance: yes Alpha (transparency) value for the text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.textAlpha For the Mobile theme, this is not supported. See also | DataGrid | ||
textDecoration | Type: String CSS Inheritance: yes Determines whether the text is underlined. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.textDecoration For the Mobile theme, if using StyleableTextField, see spark.components.supportClasses.StyleableTextField Style textDecoration, and if using StyleableStageText, this is not supported. See also | DataGrid | ||
textJustify | Type: String CSS Inheritance: yes Specifies options for justifying text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.textJustify For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: no The vertical distance, in pixels, from the top edge of the component to the top edge of its parent container's content area. | UIComponent | ||
trackingLeft | Type: Object CSS Inheritance: yes The amount of tracking (manual kerning) to be applied to the left of each character. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.trackingLeft For the Mobile theme, this is not supported. See also | DataGrid | ||
trackingRight | Type: Object CSS Inheritance: yes The amount of tracking (manual kerning) to be applied to the right of each character. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.trackingRight For the Mobile theme, this is not supported. See also | DataGrid | ||
typographicCase | Type: String CSS Inheritance: yes The type of typographic case used for this text. For the Spark theme, see flashx.textLayout.formats.ITextLayoutFormat.typographicCase For the Mobile theme, this is not supported. See also | DataGrid | ||
![]() | Type: String CSS Inheritance: no The vertical distance in pixels from the center of the component's content area to the center of the component. | UIComponent | ||
verticalScrollPolicy | Type: String CSS Inheritance: no Indicates under what conditions the vertical scroll bar is displayed.
The scroll policy affects the measured size of the scroller skin part.
This style is a reference to the scroller skin part's
ScrollPolicy.AUTO .See also | DataGrid |
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
Skin Part | Description | Defined By | ||
---|---|---|---|---|
alternatingRowColorsBackground:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render the alternatingRowColors style. The IFactory must return an object of type IVisualElement | DataGrid | ||
caretIndicator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render the grid's caret indicator. The IFactory must return an object of type IVisualElement | DataGrid | ||
columnHeaderGroup:GridColumnHeaderGroup | Required: false Part Type: Static A reference to the GridColumnHeaderGroup object that displays the column headers. | DataGrid | ||
columnSeparator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render the vertical separator between columns. The IFactory must return an object of type IVisualElement | DataGrid | ||
editorIndicator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render a background behind item renderers that are being edited. Item renderers may only be edited when the data grid and the column are both editable and the column sets rendererIsEditable to true. The IFactory must return an object of type IVisualElement | DataGrid | ||
grid:Grid | Required: false Part Type: Static A reference to the Grid control that displays row and columns. | DataGrid | ||
hoverIndicator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to provide hover feedback. The IFactory must return an object of type IVisualElement | DataGrid | ||
rowBackground:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render the background of each row. The IFactory must return an object of type IVisualElement | DataGrid | ||
rowSeparator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render the horizontal separator between header rows. The IFactory must return an object of type IVisualElement | DataGrid | ||
scroller:Scroller | Required: false Part Type: Static A reference to the Scroller control in the skin class that adds scroll bars to the DataGrid control. | DataGrid | ||
selectionIndicator:IFactory | Required: false Part Type: Dynamic The IVisualElement class used to render selected rows or cells. The IFactory must return an object of type IVisualElement | DataGrid |
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
columns | property |
columns:IList
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The list of GridColumn objectss displayed by this grid. Each column selects different data provider item properties to display.
GridColumn objects can only appear in the columns
for a single Grid control.
The default value is null
.
This property can be used as the source for data binding.
public function get columns():IList
public function set columns(value:IList):void
columnsLength | property |
columnsLength:int
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Returns the value of columns.length
if the columns IList
was specified, otherwise 0.
public function get columnsLength():int
dataProvider | property |
dataProvider:IList
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
A list of data items that correspond to the rows in the grid. Each grid column is associated with a property of the data items to display that property in the grid cells.
The default value is null
.
This property can be used as the source for data binding.
public function get dataProvider():IList
public function set dataProvider(value:IList):void
dataProviderLength | property |
dataProviderLength:int
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Returns the value of dataProvider.length
if the dataProvider IList
was specified, otherwise 0.
public function get dataProviderLength():int
dataTipField | property |
dataTipField:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The name of the field in the data provider to display as the datatip.
By default, if showDataTips
is true
,
the associated grid 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 name.
For example, you could set the value to "FullName" when a user views a
set of people's names included from a database.
GridColumn.dataTipField
takes precedence over this property.
If this column or its grid specifies a value for the
dataTipFunction
property, then the
dataTipField
property is ignored.
The default value is null
.
This property can be used as the source for data binding.
public function get dataTipField():String
public function set dataTipField(value:String):void
dataTipFunction | property |
dataTipFunction:Function
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
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, if showDataTips
is true
,
the column looks for a property named label
on each data provider item and displays it as its data tip.
However, some data providers do not have a label
property
nor do they have another property that you can use for displaying data
in the rows.
For example, you have a data provider that contains a lastName
and firstName fields, but you want to display full names as the data tip.
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 signature of the dataTipFunction
function must match the following:
dataTipFunction(item:Object, column:GridColumn):StringThe
item
parameter is the data provider item for an entire row.
The second parameter is this column object.
A typical function might concatenate an item's firstName and lastName properties, or do some custom formatting on a Date value property.
The default value is null
.
This property can be used as the source for data binding.
public function get dataTipFunction():Function
public function set dataTipFunction(value:Function):void
editable | property |
editable:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The default value for the GridColumn editable
property, which
indicates if a corresponding cell's data provider item can be edited.
If true
, clicking on a selected cell opens an item editor.
You can enable or disable editing per cell (rather than per column)
by handling the startItemEditorSession
event.
In the event handler, add the necessary logic to determine
if the cell should be editable.
The default value is false
.
public function get editable():Boolean
public function set editable(value:Boolean):void
editorColumnIndex | property |
editorColumnIndex:int
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The zero-based column index of the cell that is being edited. The value is -1 if no cell is being edited.
The default value is -1
.
public function get editorColumnIndex():int
editorRowIndex | property |
editorRowIndex:int
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The zero-based row index of the cell that is being edited. The value is -1 if no cell is being edited.
The default value is -1
.
public function get editorRowIndex():int
enableIME | property |
enableIME:Boolean
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
A flag that indicates whether the IME should be enabled when the component receives focus. If the item editor is open, it sets this property accordingly.
public function get enableIME():Boolean
imeMode | property |
imeMode:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The default value for the GridColumn imeMode
property,
which specifies the IME (Input Method Editor) mode.
The IME enables users to enter text in Chinese, Japanese, and Korean.
Flex sets the specified IME mode when the control gets focus,
and sets it back to the previous value when the control loses focus.
The flash.system.IMEConversionMode class defines constants for the
valid values for this property.
You can also specify null
to specify no IME.
The default value is null
.
public function get imeMode():String
public function set imeMode(value:String):void
See also
itemEditor | property |
itemEditor:IFactory
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The default value for the GridColumn itemEditor
property,
which specifies the IGridItemEditor class used to create item editor instances.
The default value is null.
.
This property can be used as the source for data binding.
public function get itemEditor():IFactory
public function set itemEditor(value:IFactory):void
See also
itemEditorInstance | property |
itemEditorInstance:IGridItemEditor
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
A reference to the currently active instance of the item editor, if it exists.
To access the item editor instance and the new item value when an
item is being edited, you use the itemEditorInstance
property. The itemEditorInstance
property
is not valid until the itemEditorSessionStart
event is
dispatched.
The DataGridColumn.itemEditor
property defines the
class of the item editor and, therefore, the data type of the item
editor instance.
Do not set this property in MXML.
public function get itemEditorInstance():IGridItemEditor
itemRenderer | property |
itemRenderer:IFactory
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The item renderer that's used for columns that do not specify one.
The default value is DefaultGridItemRenderer
.
This property can be used as the source for data binding.
public function get itemRenderer():IFactory
public function set itemRenderer(value:IFactory):void
See also
preserveSelection | property |
preserveSelection:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If true
, the selection is preserved when the data provider
refreshes its collection.
Because this refresh requires each item in the selection to be saved,
this action is not desirable if the selection is large.
The default value is true
.
public function get preserveSelection():Boolean
public function set preserveSelection(value:Boolean):void
requestedColumnCount | property |
requestedColumnCount:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The measured width of this grid is large enough to display
the first requestedColumnCount
columns.
If requestedColumnCount
is -1, then the measured
width is big enough for all of the columns.
If the actual size of the grid has been explicitly set, then this property has no effect.
The default value is -1
.
public function get requestedColumnCount():int
public function set requestedColumnCount(value:int):void
requestedMaxRowCount | property |
requestedMaxRowCount:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The measured height of the grid is large enough to display
no more than requestedMaxRowCount
rows.
This property has no effect if any of the following are true;
requestedRowCount
is set. The default value is 10
.
public function get requestedMaxRowCount():int
public function set requestedMaxRowCount(value:int):void
requestedMinColumnCount | property |
requestedMinColumnCount:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The measured width of this grid is large enough to display
at least requestedMinColumnCount
columns.
This property has no effect if any of the following are true;
requestedColumnCount
is set. The default value is -1
.
public function get requestedMinColumnCount():int
public function set requestedMinColumnCount(value:int):void
requestedMinRowCount | property |
requestedMinRowCount:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The measured height of this grid is large enough to display
at least requestedMinRowCount
rows.
This property has no effect if any of the following are true;
requestedRowCount
is set. The default value is -1
.
public function get requestedMinRowCount():int
public function set requestedMinRowCount(value:int):void
requestedRowCount | property |
requestedRowCount:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The measured height of this grid is large enough to display
the first requestedRowCount
rows.
If requestedRowCount
is -1, then the measured
size will be big enough for all of the layout elements.
If the actual size of the grid has been explicitly set, then this property has no effect.
The default value is -1
.
public function get requestedRowCount():int
public function set requestedRowCount(value:int):void
requireSelection | property |
requireSelection:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If true
and the selectionMode
property is not
GridSelectionMode.NONE
, an item must always be selected
in the grid.
The default value is false
.
public function get requireSelection():Boolean
public function set requireSelection(value:Boolean):void
resizableColumns | property |
resizableColumns:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Indicates whether the user can change the size of the columns.
If true
, the user can stretch or shrink the columns of
the DataGrid control by dragging the grid lines between the header cells.
If true
, individual columns must also have their
resizable
properties set to false
to
prevent the user from resizing a particular column.
The default value is true
.
This property can be used as the source for data binding.
public function get resizableColumns():Boolean
public function set resizableColumns(value:Boolean):void
rowHeight | property |
rowHeight:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If variableRowHeight
is false
, then
this property specifies the actual height of each row, in pixels.
If variableRowHeight
is true
,
the value of this property is used as the estimated
height for rows that haven't been scrolled into view yet, rather
than the preferred height of renderers configured with the typicalItem
.
Similarly, when the Grid pads its display with empty rows, this property
specifies the empty rows' height.
If variableRowHeight
is false
,
the default value of this property is the maximum preferred height
of the per-column renderers created for the typicalItem
.
This property can be used as the source for data binding.
public function get rowHeight():Number
public function set rowHeight(value:Number):void
selectedCell | property |
selectedCell:CellPosition
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS
, returns the first
selected cell starting at row 0 column 0 and progressing through each
column in a row before moving to the next row.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the
selection in MXML markup. The setSelectedCell()
method
should be used for programatic selection updates, for example
when writing a keyboard or mouse event handler.
The default value is null
.
This property can be used as the source for data binding.
public function get selectedCell():CellPosition
public function set selectedCell(value:CellPosition):void
selectedCells | property |
selectedCells:Vector.<CellPosition>
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS
, returns a Vector
of CellPosition objects representing the positions of the selected
cells in the grid.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the
selection in MXML markup. The setSelectedCell()
method
should be used for programatic selection updates, for example when
writing a keyboard or mouse event handler.
The default value is an empty Vector.<CellPosition>
This property can be used as the source for data binding.
public function get selectedCells():Vector.<CellPosition>
public function set selectedCells(value:Vector.<CellPosition>):void
selectedIndex | property |
selectedIndex:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
, returns the
rowIndex of the first selected row.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the
selection in MXML markup. The setSelectedCell()
method should be used
for programatic selection updates, for example when writing a keyboard
or mouse event handler.
The default value is -1
.
This property can be used as the source for data binding.
public function get selectedIndex():int
public function set selectedIndex(value:int):void
selectedIndices | property |
selectedIndices:Vector.<int>
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
, returns a Vector of
the selected rows indices. For all other selection modes, this
method has no effect.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the selection in MXML markup. The setSelectedCell() method should be used for programatic selection updates, for example when writing a keyboard or mouse event handler.
>The default value is an empty Vector.<int>
This property can be used as the source for data binding.
public function get selectedIndices():Vector.<int>
public function set selectedIndices(value:Vector.<int>):void
selectedItem | property |
selectedItem:Object
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
, returns the
item in the the data provider that is currently selected or
undefined
if no rows are selected.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the
selection in MXML markup. The setSelectedCell()
method should be used
for programatic selection updates, for example when writing a keyboard
or mouse event handler.
The default value is null
.
This property can be used as the source for data binding.
public function get selectedItem():Object
public function set selectedItem(value:Object):void
selectedItems | property |
selectedItems:Vector.<Object>
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
, returns a Vector of
the dataProvider items that are currently selected.
When the user changes the selection by interacting with the
control, the control dispatches the selectionChange
event. When the user changes the selection programmatically, the
control dispatches the valueCommit
event.
This property is intended be used to initialize or bind to the selection in MXML markup. The setSelectedCell() method should be used for programatic selection updates, for example when writing a keyboard or mouse event handler.
The default value is an empty Vector.<Object>
This property can be used as the source for data binding.
public function get selectedItems():Vector.<Object>
public function set selectedItems(value:Vector.<Object>):void
selectionLength | property |
selectionLength:int
[read-only] Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
,
returns the number of selected rows.
If selectionMode
is GridSelectionMode.SINGLE_CELLS
or GridSelectionMode.MULTIPLE_CELLS
,
returns the number of selected cells.
This property can be used as the source for data binding.
public function get selectionLength():int
selectionMode | property |
selectionMode:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The selection mode of the control. Possible values are:
GridSelectionMode.MULTIPLE_CELLS
,
GridSelectionMode.MULTIPLE_ROWS
,
GridSelectionMode.NONE
,
GridSelectionMode.SINGLE_CELL
, and
GridSelectionMode.SINGLE_ROW
.
Changing the selectionMode causes the current selection to be cleared and the caretRowIndex and caretColumnIndex to be set to -1.
The default value is GridSelectionMode.SINGLE_ROW
.
This property can be used as the source for data binding.
public function get selectionMode():String
public function set selectionMode(value:String):void
See also
showDataTips | property |
showDataTips:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If true
then a dataTip is displayed for all visible cells.
If false
, the default,
then a dataTip is only displayed if the column's
showDataTips
property is true
.
The default value is false
.
This property can be used as the source for data binding.
public function get showDataTips():Boolean
public function set showDataTips(value:Boolean):void
sortableColumns | property |
sortableColumns:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Specifies whether the user can interactively sort columns.
If true
, the user can sort the data provider by the
data field of a column by clicking on the column's header.
If true
, an individual column can set its
sortable
property to false
to
prevent the user from sorting by that column.
The default value is true
.
This property can be used as the source for data binding.
public function get sortableColumns():Boolean
public function set sortableColumns(value:Boolean):void
typicalItem | property |
typicalItem:Object
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
The grid's layout ensures that columns whose width is not specified is wide enough to display an item renderer for this default data provider item. If a typical item is not specified, then the first data provider item is used.
Restriction: if the typicalItem
is an IVisualItem, it must not
also be a member of the data provider.
The default value is null
.
This property can be used as the source for data binding.
public function get typicalItem():Object
public function set typicalItem(value:Object):void
variableRowHeight | property |
variableRowHeight:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If true
, each row's height is the maximum of
preferred heights of the cells displayed so far.
If false
, the height of each row is just
the value of the rowHeight
property.
If rowHeight
isn't specified, then the height of
each row is defined by the typicalItem
property.
The default value is false
.
This property can be used as the source for data binding.
public function get variableRowHeight():Boolean
public function set variableRowHeight(value:Boolean):void
DataGrid | () | Constructor |
public function DataGrid()
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Constructor.
addSelectedCell | () | method |
public function addSelectedCell(rowIndex:int, columnIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or
GridSelectionMode.MULTIPLE_CELLS
, adds the cell to
the selection and sets the caret position to the cell.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell. The columnIndex
is the index in columns
of the column containing the
selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
| |
columnIndex:int — The 0-based column index of the cell.
|
Boolean — true if no errors.
false if rowIndex
or columnIndex is invalid, or the selectionMode
is invalid.
|
addSelectedIndex | () | method |
public function addSelectedIndex(rowIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.MULTIPLE_ROWS
, adds this row to
the selection and sets the caret position to this row.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
|
Boolean — true if no errors.
false if index is invalid or
the selectionMode is invalid.
|
clearSelection | () | method |
public function clearSelection():Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Removes all of the selected rows and cells, if selectionMode
is not GridSelectionMode.NONE
. Removes the caret and
sets the anchor to the initial item.
Boolean — true if the selection changed.
false if there was nothing previously selected.
|
commitCaretPosition | () | method |
protected function commitCaretPosition(newCaretRowIndex:int, newCaretColumnIndex:int):void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Updates the grid's caret position.
If the caret position changes, the grid
skin part dispatches a
caretChange
event.
Parameters
newCaretRowIndex:int — The 0-based rowIndex of the new caret position.
| |
newCaretColumnIndex:int — The 0-based columnIndex of the new caret
position. If the selectionMode is row-based, this is -1.
|
See also
commitInteractiveSelection | () | method |
protected function commitInteractiveSelection(selectionEventKind:String, rowIndex:int, columnIndex:int, rowCount:int = 1, columnCount:int = 1):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
In response to user input (mouse or keyboard) which changes the
selection, this method dispatches the selectionChanging
event.
If the event is not canceled, it then commits the selection change, and then
dispatches the selectionChange
event.
The caret location is not updated.
To detect if the caret has changed, use the caretChanged
event.
Parameters
selectionEventKind:String — A constant defined by the GridSelectionEventKind class
that specifies the selection that is being committed. If not null, this is used to
generate the selectionChanging event.
| |
rowIndex:int — If selectionEventKind is for a row or a
cell, the 0-based rowIndex of the selection in the
data provider.
If selectionEventKind is
for multiple cells, the 0-based rowIndex of the origin of the
cell region. The default is -1 to indicate this
parameter is not being used.
| |
columnIndex:int — If selectionEventKind is for a single row or
a single cell, the 0-based columnIndex of the selection.
If selectionEventKind is for multiple
cells, the 0-based columnIndex of the origin of the
cell region. The default is -1 to indicate this
parameter is not being used.
| |
rowCount:int (default = 1 ) — If selectionEventKind is for a cell region,
the number of rows in the cell region. The default is -1 to indicate
this parameter is not being used.
| |
columnCount:int (default = 1 ) — If selectionEventKind is for a cell region,
the number of columns in the cell region. The default is -1 to
indicate this parameter is not being used.
|
Boolean — true if the selection was committed or did not change, or
false if the selection was canceled or could not be committed due to
an error, such as index out of range or the selectionEventKind is not
compatible with the selectionMode .
|
See also
endItemEditorSession | () | method |
public function endItemEditorSession(cancel:Boolean = false):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Closes the currently active editor and optionally saves the editor's value
by calling the item editor's save()
method.
If the cancel
parameter is true
,
then the editor's cancel()
method is called instead.
Parameters
cancel:Boolean (default = false ) — If false , the data in the editor is saved.
Otherwise the data in the editor is discarded.
|
Boolean — true if the editor session was saved,
and false if the save was cancelled.
|
ensureCellIsVisible | () | method |
public function ensureCellIsVisible(rowIndex:int, columnIndex:int = -1):void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If necessary, set the verticalScrollPosition
and
horizontalScrollPosition
properties so that the
specified cell is completely visible.
If rowIndex
is -1 and columnIndex
is specified,
then just adjust the horizontalScrollPosition
so that the specified column is visible.
If columnIndex
is -1 and rowIndex
is specified, then just adjust the verticalScrollPosition
so that the specified row is visible.
Parameters
rowIndex:int — The 0-based row index of the item renderer's cell, or -1 to specify a column.
| |
columnIndex:int (default = -1 ) — The 0-based column index of the item renderer's cell, or -1 to specify a row.
|
invalidateCell | () | method |
public function invalidateCell(rowIndex:int, columnIndex:int):void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If the specified cell is visible, it is redisplayed.
If variableRowHeight=true
,
then doing so may cause the height of the corresponding row to change.
If columnIndex is -1, then the entire row is invalidated.
Similarly if rowIndex is -1
, then the entire column is invalidated.
This method should be called when there is a change to any aspect of
the data provider item at rowIndex
that might have some
impact on the way the specified cell is displayed.
Calling this method is similar to calling the
dataProvider.itemUpdated()
method, which advises the Grid that all rows
displaying the specified item should be redisplayed.
Using this method can be relatively efficient, since it narrows
the scope of the change to a single cell.
Parameters
rowIndex:int — The 0-based row index of the cell that changed, or -1.
| |
columnIndex:int — The 0-based column index of the cell that changed or -1.
|
invalidateTypicalItem | () | method |
public function invalidateTypicalItem():void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
removeSelectedCell | () | method |
public function removeSelectedCell(rowIndex:int, columnIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or
GridSelectionMode.MULTIPLE_CELLS
, removes the cell
from the selection and sets the caret position to the cell.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell. The columnIndex
is the index in columns
of the column containing the
selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
| |
columnIndex:int — The 0-based column index of the cell.
|
Boolean — true if no errors.
false if rowIndex
or columnIndex is invalid or the selectionMode
is invalid.
|
removeSelectedIndex | () | method |
public function removeSelectedIndex(rowIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or
GridSelectionMode.MULTIPLE_ROWS
, removes this row
from the selection and sets the caret position to this row.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
|
Boolean — true if no errors.
false if index is invalid or
the selectionMode is invalid.
|
selectAll | () | method |
public function selectAll():Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is
GridSelectionMode.MULTIPLE_ROWS
, selects all rows and
removes the caret or if selectionMode
is
GridSelectionMode.MULTIPLE_CELLS
selects all cells
and removes the caret. For all other selection modes, this method
has no effect.
If items are added to the dataProvider
or
columns
are added after this method is called, the
new rows or cells in the new column will be selected.
This implicit "selectAll" mode ends when any of the following occur:
clearSelection
setSelectedCell
,
setSelectedCells
, setSelectedIndex
,
selectIndices
dataProvider
is refreshed and preserveSelection
is falsedataProvider
is resetcolumns
is refreshed,
preserveSelection
is false
and
selectionMode
is
GridSelectionMode.MULTIPLE_CELLS
columns
is reset and selectionMode
is
GridSelectionMode.MULTIPLE_CELLS
Boolean — true if the selection changed.
|
selectCellRegion | () | method |
public function selectCellRegion(rowIndex:int, columnIndex:int, rowCount:uint, columnCount:uint):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.MULTIPLE_CELLS
,
sets the selection to all the cells in the cell region and the
caret position to the last cell in the cell region.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the origin of the cell region.
The columnIndex
is the index in columns
of the column containing the
origin of the cell region.
This method has no effect if the cell region is not wholly contained within the grid.
Parameters
rowIndex:int — The 0-based row index of the origin of the cell region.
| |
columnIndex:int — The 0-based column index of the origin of the cell
region.
| |
rowCount:uint — Number of rows, starting at rowIndex to
include in the cell region.
| |
columnCount:uint — Number of columns, starting at
columnIndex to include in the cell region.
|
Boolean — true if no errors.
false if the cell region is invalid or
the selectionMode is invalid.
|
selectIndices | () | method |
public function selectIndices(rowIndex:int, rowCount:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.MULTIPLE_ROWS
,
sets the selection to the specfied rows and the caret position to
endRowIndex
.
For all other selection modes, this method has no effect.
Each index represents an item in the data provider to include in the selection.
Parameters
rowIndex:int — 0-based row index of the first row in the selection.
| |
rowCount:int — Number of rows in the selection.
|
Boolean — true if no errors.
false if any of the indices are invalid,
if startRowIndex is not less than or equal to
endRowIndex , or the selectionMode is invalid.
|
selectionContainsCell | () | method |
public function selectionContainsCell(rowIndex:int, columnIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or GridSelectionMode.MULTIPLE_CELLS
, returns true
if the cell is in the current selection.
The rowIndex
must be between 0 and the
length of the data provider. The columnIndex
must be between 0 and the length of columns
.
Parameters
rowIndex:int — The 0-based row index of the cell.
| |
columnIndex:int — The 0-based column index of the cell.
|
Boolean — true if the current selection contains the cell.
|
selectionContainsCellRegion | () | method |
public function selectionContainsCellRegion(rowIndex:int, columnIndex:int, rowCount:int, columnCount:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is
GridSelectionMode.MULTIPLE_CELLS
, returns true
if the cells in the cell region are in the current selection.
The rowIndex
must be between 0 and the
length of the data provider. The columnIndex
must be between 0 and the length of columns
.
Parameters
rowIndex:int — The 0-based row index of the cell.
| |
columnIndex:int — The 0-based column index of the cell.
| |
rowCount:int — Number of rows, starting at rowIndex to
include in the cell region.
| |
columnCount:int — Number of columns, starting at
columnIndex to include in the cell region.
|
Boolean — true if the current selection contains all
the cells in the cell region.
|
selectionContainsIndex | () | method |
public function selectionContainsIndex(rowIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or GridSelectionMode.MULTIPLE_ROWS
, returns true
if the row at index
is in the current selection.
The rowIndex
is the index in the data provider
of the item containing the selected cell.
Parameters
rowIndex:int — The 0-based row index of the row.
|
Boolean — true if the selection contains the row.
|
selectionContainsIndices | () | method |
public function selectionContainsIndices(rowIndices:Vector.<int>):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is
GridSelectionMode.MULTIPLE_ROWS
, returns true
if the rows in indices
are in the current selection.
Parameters
rowIndices:Vector.<int> — Vector of 0-based row indices to include in selection.
|
Boolean — true if the current selection contains these rows.
|
setSelectedCell | () | method |
public function setSelectedCell(rowIndex:int, columnIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_CELL
or
GridSelectionMode.MULTIPLE_CELLS
, sets the selection
and the caret position to this cell.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell. The columnIndex
is the index in columns
of the column containing the
selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
| |
columnIndex:int — The 0-based column index of the cell.
|
Boolean — true if if no errors.
false if rowIndex
or columnIndex is invalid or the selectionMode
is invalid.
|
setSelectedIndex | () | method |
public function setSelectedIndex(rowIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
If selectionMode
is GridSelectionMode.SINGLE_ROW
or
GridSelectionMode.MULTIPLE_ROWS
, sets the selection and
the caret position to this row.
For all other selection modes, this method has no effect.
The rowIndex
is the index in the data provider
of the item containing the selected cell.
Parameters
rowIndex:int — The 0-based row index of the cell.
|
Boolean — true if if no errors.
false if index is invalid, or
the selectionMode is invalid.
|
sortByColumns | () | method |
public function sortByColumns(columnIndices:Vector.<int>, isInteractive:Boolean = false):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Sort the DataGrid by one or more columns, and refresh the display.
If the dataProvider
is an ICollectionView, then it's sort
property is
set to a value based on each column's dataField
, sortCompareFunction
,
and sortDescending
flag.
Then, the data provider's refresh()
method is called.
If the dataProvider
is not an ICollectionView, then this method has no effect.
Parameters
columnIndices:Vector.<int> — The indices of the columns by which to sort the dataProvider .
| |
isInteractive:Boolean (default = false ) — If true, GridSortEvent.SORT_CHANGING and
GridSortEvent.SORT_CHANGE events are dispatched and the column header group
visibleSortIndicatorIndices is updated with columnIndices
if the GridSortEvent.SORT_CHANGING event is not cancelled.
|
Boolean — true if the dataProvider was sorted with the provided
column indicies.
|
See also
startItemEditorSession | () | method |
public function startItemEditorSession(rowIndex:int, columnIndex:int):Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Starts an editor session on a selected cell in the grid. This method
by-passes checks of the editable property on the DataGrid and GridColumn
that prevent the user interface from starting an editor session.
A startItemEditorSession
event is dispatched before
an item editor is created. This allows a listener dynamically change
the item editor for a specified cell.
The event can also be cancelled by calling the
preventDefault()
method, to prevent the
editor session from being created.
Parameters
rowIndex:int — The zero-based row index of the cell to edit.
| |
columnIndex:int — The zero-based column index of the cell to edit.
|
Boolean — true if the editor session was started.
Returns false if the editor session was cancelled or was
otherwise unable to be started. Note that an editor session cannot be
started in a column that is not visible.
|
caretChange | Event |
spark.events.GridCaretEvent
spark.events.GridCaretEvent.CARET_CHANGE
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the caret position, size, or
visibility has changed due to user interaction or being programmatically set.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
GridSelectionEvent.CARET_CHANGE
constant defines
the value of the type
property of the event object for a
caretChange
event, which indicates that the current
caret position has just been changed.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
newColumnIndex | The zero-based column
index of the caret position after it was changed. It is -1 if
the selectionMode is row-based. |
newRowIndex | The zero-based row index of the caret position after it was changed. |
oldColumnIndex | The zero-based column
index of the caret position before it was changed. It is -1 if
the selectionMode is row-based. |
oldRowIndex | The zero-based row index of the caret position before it was changed. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdCaretEvent.CARET_CHANGE |
gridClick | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_CLICK
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the mouse is clicked over a cell.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridClick
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_CLICK |
gridDoubleClick | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_DOUBLE_CLICK
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the mouse is double-clicked over a cell.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridDoubleClick
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_DOUBLE_CLICK |
gridItemEditorSessionCancel | Event |
spark.events.GridItemEditorEvent
spark.events.GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_CANCEL
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched after the item editor has been closed without saving its data.
TheGridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_CANCEL
constant defines the value of the type
property of the
event object for a cancelridItemEditor
event.
Dispatched after the item editor has been closed without saving its data.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
columnIndex | The zero-based column index of the item that was edited but not modified. |
rowIndex | The zero-based row index of the item that was edited but not modified. |
column | The column of the cell that was edited. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_CANCEL |
See also
gridItemEditorSessionSave | Event |
spark.events.GridItemEditorEvent
spark.events.GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_SAVE
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched after the data in item editor has been saved into the data provider and the editor has been closed.
TheGridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_SAVE
constant defines the value of the type
property of the
event object for a saveGridItemEditor
event.
Dispatched after the data in item editor has been saved into the data
provider and the editor has been closed.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
columnIndex | The zero-based column index of the item that was modified. |
rowIndex | The zero-based row index of the item that was modified. |
column | The column of the cell that was edited. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_SAVE |
See also
gridItemEditorSessionStart | Event |
spark.events.GridItemEditorEvent
spark.events.GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_START
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched immediately after an item editor has been opened.
TheGridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_START
constant defines the value of the type
property of the
event object for a openGridItemEditor
event.
Dispatched immediately after an item editor has been opened.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
columnIndex | The zero-based column index of the item editor. |
rowIndex | The zero-based row index of the item editor. |
column | The column of the cell that is being edited. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_START |
See also
gridItemEditorSessionStarting | Event |
spark.events.GridItemEditorEvent
spark.events.GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched when a new item editor session has been requested. A listener can
dynamically determine if a cell is editable and cancel the edit (by calling
the preventDefault()
method) if it is not.
A listener may also dynamically change the editor used by assigning a
different item editor to a column.
If this event is canceled the item editor will not be created.
TheGridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING
constant defines the value of the type
property of the
event object for a startGridItemEditorSession
event.
Dispatched when a new item editor session has been requested. A listener
can dynamically determine if a cell is editable and cancel the edit by calling
the preventDefault()
method if it is not.
A listener can also dynamically change the editor used
by assigning a different item editor to a grid column.
If this event is canceled the item editor will not be created.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | true |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
columnIndex | The zero-based column index of the requested item editor. |
rowIndex | The zero-based row index of the requested item editor. |
column | The column of the cell associated with the edit request. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridItemEditorEvent.GRID_ITEM_EDITOR_SESSION_STARTING |
See also
gridMouseDown | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_MOUSE_DOWN
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the mouse button
is pressed over a grid cell.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridMouseDown
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_MOUSE_DOWN |
gridMouseDrag | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_MOUSE_DRAG
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part after a gridMouseDown
event
if the mouse moves before the button is released.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridMouseDrag
GridEvent.
This event is only dispatched when a listener has handled a mouseDown
event,
and then only while the mouse moves with the button held down.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_MOUSE_DRAG |
gridMouseUp | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_MOUSE_UP
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part after a gridMouseDown
event
when the mouse button is released, even if the mouse is no longer within the grid.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridMouseUp
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_MOUSE_UP |
gridRollOut | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_ROLL_OUT
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the mouse leaves a grid cell.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridRollOut
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_ROLL_OUT |
gridRollOver | Event |
spark.events.GridEvent
spark.events.GridEvent.GRID_ROLL_OVER
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched by the grid
skin part when the mouse enters a grid cell.
To handle this event, assign an event handler to the grid
skin part
of the DataGrid control.
type
property for a gridRollOver
GridEvent.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
column | The column where the event occurred, or null if the event did not occur over a column. |
columnIndex | The index of the column where the event occurred, or -1 if the event did not occur over a grid column. |
grid | The Grid associated with this event. |
item | The data provider item for this row, or null if the event did not occur over a grid row. |
itemRenderer | The The item renderer that displayed this cell, or null if the event did not occur over a visible cell. |
rowIndex | The index of the row where the event occurred, or -1 if the event did not occur over a grid row. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GirdEvent.GRID_ROLL_OVER |
selectionChange | Event |
spark.events.GridSelectionEvent
spark.events.GridSelectionEvent.SELECTION_CHANGE
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched when the selection has changed.
This event is dispatched when the user interacts with the control.
When you change the selection programmatically,
the component does not dispatch the selectionChange
event.
In either case it dispatches the valueCommit
event as well.
GridSelectionEvent.SELECTION_CHANGE
constant defines
the value of the type
property of the event object for a
selectionChange
event, which indicates that the current
selection has just been changed.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the selectionChange
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
kind
| The kind of changing event. The valid values are defined in GridSelectionEventKind class as constants. This value determines which properties in the event are used. |
selectionChange | The just completed selection change that was triggered by a user gesture. Use the DataGrid selection methods to determine the current selection. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridSelectionEvent.SELECTION_CHANGE |
selectionChanging | Event |
spark.events.GridSelectionEvent
spark.events.GridSelectionEvent.SELECTION_CHANGING
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched when the selection is going to change.
Calling the preventDefault()
method
on the event prevents the selection from changing.
This event is dispatched when the user interacts with the control.
When you change the selection programmatically,
the component does not dispatch the selectionChanging
event.
GridSelectionEvent.SELECTION_CHANGING
constant defines
the value of the type
property of the event object for a
selectionChanging
event, which indicates that the current
selection is about to change. Call preventDefault() on this event
to prevent the selection from changing.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the selectionChanging
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget . |
kind
| The kind of changing event. The valid values are defined in GridSelectionEventKind class as constants. This value determines which properties in the event are used. |
selectionChange | The upcoming selection change that is triggered by a user gesture. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridSelectionEvent.SELECTION_CHANGING |
sortChange | Event |
spark.events.GridSortEvent
spark.events.GridSortEvent.SORT_CHANGE
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched after the sort has been applied to the data provider's collection. Typically this is after the user releases the mouse button on a column header and the sort has been applied to the data provider's collection.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the sortChanging
event.
GridSortEvent.SORT_CHANGE
constant defines
the value of the type
property of the event object for a
sortChange
event, which indicates that a sort filter has just been
applied to the grid's dataProvider
collection.
Typically, if a column header mouse click triggered the sort, then the last index of
columnIndices
is the column's index.
Note that interactive sorts are not necessarily triggered by a mouse click.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the sortChange
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
columnIndices | The vector of column indices of the sorted columns. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myDataGrid.addEventListener() to register an event listener,
myDataGrid is the value of the currentTarget . |
newSortFields | The array of ISortFields for this sort. |
oldSortFields | The array of ISortFields for the last sort. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridSelectionEvent.SORT_CHANGE |
sortChanging | Event |
spark.events.GridSortEvent
spark.events.GridSortEvent.SORT_CHANGING
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.5 |
Runtime Versions : | Flash Player 10, AIR 2.5 |
Dispatched before the sort has been applied to the data provider's collection. Typically this is when the user releases the mouse button on a column header to request the control to sort the grid contents based on the contents of the column. Only dispatched if the column is sortable and the data provider supports sorting.
The DataGrid control has a default handler for this event that implements
a single-column sort and updates the visibleSortIndices
in the grid's
columnHeaderGroup
with the columnIndices
.
Multiple-column sort can be implemented by calling the preventDefault()
method
to prevent the single column sort and setting the columnIndices
and
newSortFields
parameters of the event to change the default behavior.
newSortFields
should be set to the desired sort fields.
columnIndices
should be set to the indices of the columns that should
have a visible sort indicator in the column header bar.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the sortChanging
event.
GridSortEvent.SORT_CHANGING
constant defines
the value of the type
property of the event object for a
sortChanging
event, which indicates that a sort filter is about to be
applied to the grid's dataProvider
collection.
Call preventDefault() on this event to prevent the sort from occurring
or you modify columnIndices
and newSortFields
if you want to
change the default behavior of the sort.
Typically, if a column header mouse click triggered the sort, then the last index of
columnIndices
is the column's index.
Note that interactive sorts are not necessarily triggered by a mouse click.
This event is dispatched when the user interacts with the control.
When you sort the data provider's collection programmatically,
the component does not dispatch the sortChanging
event.
The properties of the event object have the following values:
Property | Value |
---|---|
bubbles | false |
cancelable | false |
columnIndices | The vector of column indices of the columns to be sorted. |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myDataGrid.addEventListener() to register an event listener,
myDataGrid is the value of the currentTarget . |
newSortFields | The array of ISortFields for this sort. |
oldSortFields | The array of ISortFields for the last sort. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
type | GridSelectionEvent.SORT_CHANGING |