Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
IGroupingCollection

Package | mx.collections
Interface | public interface IGroupingCollection extends IHierarchicalData, flash.events.IEventDispatcher
Implementors | GroupingCollection

Deprecated Since 4.0: Please Use IGroupingCollection2

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The IGroupingCollection interface defines the interface required to create grouped data from flat data.

See also

mx.collections.GroupingCollection
mx.controls.AdvancedDataGrid

Public Properties

| Property | Defined By
--- | --- | ---
|  | grouping : Grouping The Grouping object applied to the source data. | IGroupingCollection

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | cancelRefresh():void If the refresh is performed asynchronously, cancels the refresh operation and stops the building of the groups. | IGroupingCollection
|  | canHaveChildren(node:Object):Boolean Returns true if the node can contain children. | IHierarchicalData
|  | getChildren(node:Object):Object Returns an Object representing the node's children. | IHierarchicalData
|  | getData(node:Object):Object Returns data from a node. | IHierarchicalData
|  | getRoot():Object Returns the root data item. | IHierarchicalData
|  | hasChildren(node:Object):Boolean Returns true if the node has children. | IHierarchicalData
|  | refresh(async:Boolean = false):Boolean Applies the grouping to the view. | IGroupingCollection

Property Detail

grouping | property

`grouping:Grouping`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The Grouping object applied to the source data. Setting this property does not automatically refresh the view; therefore, you must call the `refresh()` method after setting this property.

Note: The Flex implementations of IGroupingCollection retrieve all items from a remote location before executing grouping.

Implementation
`public function get grouping():Grouping`
`public function set grouping(value:Grouping):void`
Method Detail

cancelRefresh | () | method

`public function cancelRefresh():void`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

If the refresh is performed asynchronously, cancels the refresh operation and stops the building of the groups. This method only cancels the refresh if it is initiated by a call to the `refresh()` method with an argument of `true`, corresponding to an asynchronous refresh.

refresh | () | method |

`public function refresh(async:Boolean = false):Boolean`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Applies the grouping to the view. The IGroupingCollection does not detect changes to a group automatically, so you must call the `refresh()` method to update the view after setting the `group` property.

The `refresh()` method can be applied asynchronously by calling `refresh(true)`.

When `refresh()` is called synchronously, a client should wait for a CollectionEvent event with the value of the `kind` property set to `CollectionEventKind.REFRESH` to ensure that the `refresh()` method completed.

Parameters

| `async:Boolean` (default = `false`)`` — If `true`, defines the refresh to be asynchronous. By default it is `false` denoting synchronous refresh.

Returns

| `Boolean` — `true` if the `refresh()` method completed, and `false` if the refresh is incomplete, which can mean that items are still pending.

Sun Mar 5 2017, 03:42 PM +11:00