Paket | mx.collections |
Sınıf | public class GroupingCollection |
Miras Alma | GroupingCollection HierarchicalData EventDispatcher Object |
Uygular | IGroupingCollection |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
To populate the AdvancedDataGrid control with grouped data,
you create an instance of the GroupingCollection class from your flat data,
and then pass that GroupingCollection instance to the data provider
of the AdvancedDataGrid control.
To specify the grouping fields of your flat data,
you pass a Grouping instance to
the GroupingCollection.grouping
property.
The Grouping instance contains an Array of GroupingField instances,
one per grouping field.
The following example uses the GroupingCollection class to define two grouping fields: Region and Territory.
<mx:AdvancedDataGrid id="myADG" <mx:dataProvider> <mx:GroupingCollection id="gc" source="{dpFlat}"> <mx:grouping> <mx:Grouping> <mx:GroupingField name="Region"/> <mx:GroupingField name="Territory"/> </mx:Grouping> </mx:grouping> </mx:GroupingCollection> </mx:dataProvider> <mx:columns> <mx:AdvancedDataGridColumn dataField="Region"/> <mx:AdvancedDataGridColumn dataField="Territory"/> <mx:AdvancedDataGridColumn dataField="Territory_Rep"/> <mx:AdvancedDataGridColumn dataField="Actual"/> <mx:AdvancedDataGridColumn dataField="Estimate"/> </mx:columns> </mx:AdvancedDataGrid>MXML SözdizimiMXML Sözdizimini Gizle
<mx.GroupingCollection>
inherits all the tag attributes of its superclass,
and defines the following tag attributes:
<mx:GroupingCollection Properties grouping="No default" source="No default" summaries="No default" />
This Class has been deprecated and replaced by a new Class
GroupingCollection2
which provide faster,
improved performance and a new summary calculation mechanism.
Class SummaryField
has also been deprecated and
replaced by a new Class SummaryField2
.
Properties operation
and summaryFunction
are
not present in the Class SummaryField2
.
A new property summaryOperation
is introduced in
SummaryField2
.
Varsayılan MXML Özelliğigrouping
İlgili API Öğeleri
Özellik | Tanımlayan: | ||
---|---|---|---|
childrenField : String
Indicates the field name to be used to detect children objects in
a data item. | HierarchicalData | ||
constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | ||
grouping : Grouping
Specifies the Grouping instance applied to the source data. | GroupingCollection | ||
source : Object [geçersiz kıl]
The source collection containing the flat data to be grouped. | GroupingCollection | ||
summaries : Array
Array of SummaryRow instances that define any root-level data summaries. | GroupingCollection |
Özellik | Tanımlayan: | ||
---|---|---|---|
timer : flash.utils:Timer
The timer which is associated with an asynchronous refresh operation. | GroupingCollection |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Constructor. | GroupingCollection | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder. | EventDispatcher | ||
If the refresh is performed asynchronously,
cancels the refresh operation and stops the building of the groups. | GroupingCollection | ||
Returns true if the node can contain children. | HierarchicalData | ||
Olay akışına bir olay gönderir. | EventDispatcher | ||
Returns an Object representing the node's children. | HierarchicalData | ||
Returns data from a node. | HierarchicalData | ||
[geçersiz kıl]
Return super.source, if the grouping property is set,
and an ICollectionView instance that refers to super.source if not. | GroupingCollection | ||
Returns true if the node has children. | HierarchicalData | ||
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | ||
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | ||
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | ||
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | ||
Applies the grouping to the view. | GroupingCollection | ||
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | ||
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | ||
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | ||
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | ||
Belirtilen nesnenin temel değerini döndürür. | Object | ||
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder. | EventDispatcher |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Returns the parent of a node. | GroupingCollection |
grouping | özellik |
grouping:Grouping
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Specifies the Grouping instance applied to the source data.
Setting the grouping
property
does not automatically refresh the view,
so you must call the refresh()
method
after setting this property.
Uygulama
public function get grouping():Grouping
public function set grouping(value:Grouping):void
İlgili API Öğeleri
source | özellik |
source:Object
[geçersiz kıl] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
The source collection containing the flat data to be grouped. If the source is not a collection, it will be auto-wrapped into a collection.
Uygulama
override public function get source():Object
override public function set source(value:Object):void
summaries | özellik |
public var summaries:Array
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Array of SummaryRow instances that define any root-level data summaries. Specify one or more SummaryRow instances to define the data summaries, as the following example shows:
<mx:AdvancedDataGrid id="myADG" width="100%" height="100%" initialize="gc.refresh();"> <mx:dataProvider> <mx:GroupingCollection id="gc" source="{dpFlat}"> <mx:summaries> <mx:SummaryRow summaryPlacement="last"> <mx:fields> <mx:SummaryField dataField="Actual" label="Min Actual" operation="MIN"/> <mx:SummaryField dataField="Actual" label="Max Actual" operation="MAX"/> </mx:fields> </mx:SummaryRow> </mx:summaries> <mx:Grouping> <mx:GroupingField name="Region"/> <mx:GroupingField name="Territory"/> </mx:Grouping> </mx:GroupingCollection> </mx:dataProvider> <mx:columns> <mx:AdvancedDataGridColumn dataField="Region"/> <mx:AdvancedDataGridColumn dataField="Territory_Rep" headerText="Territory Rep"/> <mx:AdvancedDataGridColumn dataField="Actual"/> <mx:AdvancedDataGridColumn dataField="Estimate"/> <mx:AdvancedDataGridColumn dataField="Min Actual"/> <mx:AdvancedDataGridColumn dataField="Max Actual"/> </mx:columns> </mx:AdvancedDataGrid>
İlgili API Öğeleri
timer | özellik |
protected var timer:flash.utils:Timer
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
The timer which is associated with an asynchronous refresh operation.
You can use it to change the timing interval, pause the refresh,
or perform other actions.
The default value for the delay
property of the
Timer instance is 1, corresponding to 1 millisecond.
GroupingCollection | () | Yapıcı |
public function GroupingCollection()
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Constructor.
cancelRefresh | () | yöntem |
public function cancelRefresh():void
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | 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.
getParent | () | yöntem |
protected function getParent(node:Object):*
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | Flash Player 9, AIR 1.1 |
Returns the parent of a node.
The parent of a top-level node is null
.
Parametreler
node:Object — The Object that defines the node.
|
* — The parent node containing the node as child,
null for a top-level node,
and undefined if the parent cannot be determined.
|
getRoot | () | yöntem |
refresh | () | yöntem |
public function refresh(async:Boolean = false):Boolean
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 3 |
Çalışma Zamanı Sürümleri: | 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.
Parametreler
async:Boolean (default = false ) — If true , defines the refresh to be asynchronous.
By default it is false denoting synchronous refresh.
|
Boolean — true if the refresh() method completed,
and false if the refresh is incomplete,
which can mean that items are still pending.
|
Tue Jun 12 2018, 01:09 PM Z