Package | spark.events |
Class | public class GridSortEvent |
Inheritance | GridSortEvent Event Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
Related API Elements
spark.components.gridClasses.GridColumn
spark.components.GridColumnHeaderGroup
Property | Defined By | ||
---|---|---|---|
bubbles : Boolean [read-only]
Indicates whether an event is a bubbling event. | Event | ||
cancelable : Boolean [read-only]
Indicates whether the behavior associated with the event can be prevented. | Event | ||
columnIndices : Vector.<int>
The vector of column indices of the sorted columns. | GridSortEvent | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
currentTarget : Object [read-only]
The object that is actively processing the Event object with an event listener. | Event | ||
eventPhase : uint [read-only]
The current phase in the event flow. | Event | ||
newSortFields : Array
The array of ISortFields for this sort. | GridSortEvent | ||
oldSortFields : Array [read-only]
The array of ISortFields for the last sort. | GridSortEvent | ||
target : Object [read-only]
The event target. | Event | ||
type : String [read-only]
The type of event. | Event |
Method | Defined By | ||
---|---|---|---|
GridSortEvent(type:String, bubbles:Boolean, cancelable:Boolean, columnIndices:Vector.<int>, oldSortFields:Array, newSortFields:Array)
Constructor. | GridSortEvent | ||
Duplicates an instance of an Event subclass. | Event | ||
A utility function for implementing the toString() method in custom
ActionScript 3.0 Event classes. | Event | ||
Indicates whether an object has a specified property defined. | Object | ||
Checks whether the preventDefault() method has been called on the event. | Event | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Cancels an event's default behavior if that behavior can be canceled. | Event | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Prevents processing of any event listeners in the current node and any subsequent nodes in
the event flow. | Event | ||
Prevents processing of any event listeners in nodes subsequent to the current node in the
event flow. | Event | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns a string containing all the properties of the Event object. | Event | ||
Returns the primitive value of the specified object. | Object |
Constant | Defined By | ||
---|---|---|---|
SORT_CHANGE : String = "sortChange" [static]
The 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. | GridSortEvent | ||
SORT_CHANGING : String = "sortChanging" [static]
The 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. | GridSortEvent |
columnIndices | property |
public var columnIndices:Vector.<int>
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
The vector of column indices of the sorted columns.
If type
is GridSelectionEvent.SORT_CHANGING
this value
can be modified and it will be used to update the grid's columnHeaderGroup
visibleSortIndicatorIndices
.
Related API Elements
newSortFields | property |
public var newSortFields:Array
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
The array of ISortFields for this sort.
If type
is GridSelectionEvent.SORT_CHANGING
this value
can be modified and it will be used to sort the dataProvider
of the grid.
Related API Elements
oldSortFields | property |
oldSortFields:Array
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
The array of ISortFields for the last sort. This can be null
.
The elements in this Array should not be modified.
Implementation
public function get oldSortFields():Array
Related API Elements
GridSortEvent | () | Constructor |
public function GridSortEvent(type:String, bubbles:Boolean, cancelable:Boolean, columnIndices:Vector.<int>, oldSortFields:Array, newSortFields:Array)
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
Constructor.
Parameterstype:String — The event type; indicates the action that caused the event.
| |
bubbles:Boolean — Specifies whether the event can bubble
up the display list hierarchy.
| |
cancelable:Boolean — Specifies whether the behavior
associated with the event can be prevented.
| |
columnIndices:Vector.<int> — The vector of column indices of the sorted columns.
| |
oldSortFields:Array — The array of ISortFields for the last sort.
| |
newSortFields:Array — The array of ISortFields for this sort.
|
SORT_CHANGE | Constant |
public static const SORT_CHANGE:String = "sortChange"
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
The 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 |
Related API Elements
SORT_CHANGING | Constant |
public static const SORT_CHANGING:String = "sortChanging"
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4.5 |
Runtime Versions: | Flash Player 10, AIR 2.5 |
The 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 |
Related API Elements
Wed Nov 21 2018, 06:34 AM -08:00