{ "type": "class", | |
"qname": "mx.collections.GroupingField", | |
"baseClassname": "" | |
, | |
"description": "The GroupingField class represents individual data fields that you use to group flat data for display by the AdvancedDataGrid control. <p>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 <code>GroupingCollection.grouping</code> property. The Grouping instance contains an Array of GroupingField instances, one per grouping field. </p> <p>The following example uses the Grouping class to define two grouping fields: Region and Territory.</p> <pre>\\n <mx:AdvancedDataGrid id="myADG"\\n <mx:dataProvider>\\n <mx:GroupingCollection id="gc" source="{dpFlat}">\\n <mx:grouping>\\n <mx:Grouping>\\n <mx:GroupingField name="Region"/>\\n <mx:GroupingField name="Territory"/>\\n </mx:Grouping>\\n </mx:grouping>\\n </mx:GroupingCollection>\\n </mx:dataProvider>\\n \\n <mx:columns>\\n <mx:AdvancedDataGridColumn dataField="Region"/>\\n <mx:AdvancedDataGridColumn dataField="Territory"/>\\n <mx:AdvancedDataGridColumn dataField="Territory_Rep"/>\\n <mx:AdvancedDataGridColumn dataField="Actual"/>\\n <mx:AdvancedDataGridColumn dataField="Estimate"/>\\n </mx:columns>\\n </mx:AdvancedDataGrid>\\n </pre> The <code><mx.GroupingField></code> inherits all the tag attributes of its superclass, and defines the following tag attributes:</p> <pre>\\n <mx:GroupingField\\n <b>Properties </b>\\n caseInsensitive="false|true"\\n compareFunction="<i>No default</i>"\\n descending="false|true"\\n groupingFunction="<i>No default</i>"\\n groupingObjectFunction="<i>No default</i>"\\n name="null"\\n numeric="false|true"\\n summaries="<i>No default</i>"\\n />\\n </pre>", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["mx.controls.AdvancedDataGrid", "mx.collections.GroupingCollection", "mx.collections.Grouping"]}, | |
{ "tagName": "royalesuppresspublicvarwarning", | |
"values": []}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "mxml", | |
"values": []}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "mx.collections.GroupingField", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor. comparison. If the object is a simple type, pass <code>null</code>. whether to ignore the case of the values. descending order. numbers, instead of alphabetically.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["name The name of the property that this field uses for", "caseInsensitive When sorting strings, tells the comparitor", "descending Tells the comparator whether to arrange items in", "numeric Tells the comparitor whether to compare sort items as"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": [{ "name": "name", "type": "String"}, | |
{ "name": "caseInsensitive", "type": "Boolean"}, | |
{ "name": "descending", "type": "Boolean"}, | |
{ "name": "numeric", "type": "Boolean"}]} | |
, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Boolean", | |
"qname": "caseInsensitive", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Set to <code>true</code> if the sort for this field should be case-insensitive.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["false"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Function", | |
"qname": "compareFunction", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The function that compares two items during a sort of items for the associated collection. If you specify a <code>compareFunction</code> property in a Grouping object, Flex ignores any <code>compareFunction</code> properties of the GroupingField objects. <p>The compare function must have the following signature:</p> <pre>function myCompare(a:Object, b:Object):int</pre> <p>This function must return the following values:</p> <ul> <li>-1, if <code>a</code> should appear before <code>b</code> in the sorted sequence.</li> <li>0, if <code>a</code> equals <code>b</code>.</li> <li>1, if <code>a</code> should appear after <code>b</code> in the sorted sequence.</li> </ul> <p>The default value is an internal compare function that can perform a string, numeric, or date comparison in ascending or descending order, with case-sensitive or case-insensitive string comparisons. Specify your own function only if you need a custom comparison algorithm. This is normally only the case if a calculated field is used in a display.</p>", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Boolean", | |
"qname": "descending", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Set to <code>true</code> if the sort for this field should be in descending order.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["false"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "String", | |
"qname": "name", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "The name of the field to be sorted.", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["null"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Boolean", | |
"qname": "numeric", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Specifies that if the field being sorted contains numeric (Number/int/uint) values, or String representations of numeric values, the comparitor uses a numeric comparison. If this property is <code>false</code>, fields with String representations of numbers are sorted using String comparison, so 100 precedes 99, because "1" is a lower string value than "9".", | |
"tags": [ | |
{ "tagName": "default", | |
"values": ["false"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "groupingFunction", | |
"return": "Function", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "A function that determines the label for this group. By default, the group displays the text for the field in the data that matches the filed specified by the <code>name</code> property. However, sometimes you want to group the items based on more than one field in the data, or group based on something that is not a simple String field. In such a case, you specify a callback function by using the <code>groupingFunction</code> property. <p>A callback function might convert a number for the month into the String for the month, or group multiple items into a single group based on some criteria other than the actual value of the field.</p> <p>For the GroupField, the method signature has the following form:</p> <pre>groupingFunction(item:Object, field:GroupField):String</pre> <p>Where <code>item</code> contains the data item object, and <code>field</code> contains the GroupField object.</p> For example, a <code>groupingFunction</code> which returns the first character as the group name can be written as - <pre>\\n private function groupFunc(item:Object, field:GroupingField):String\\n {\\n return item[field.name].toString().substr(0, 1);\\n }\\n </pre>", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "groupingObjectFunction", | |
"return": "Function", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "A callback function to run on each group node to determine the grouping object. By default, a new Object will be created for group nodes. <p>You can supply a <code>groupingObjectFunction</code> that provides the appropriate Object for group nodes.</p> <p>The method signature is:</p> <pre>\\n myGroupObjectFunction(label:String):Object</pre> <p>Where <code>label</code> contains the value that will be shown for that group node. The function returns an Object that will be used for group nodes. </p> For example, a <code>groupingObjectFunction</code> which returns an Object containing a "name" property with value as "Bob" can be written as - <pre>\\n private function groupObjFunction(label:String):Object\\n {\\n var obj:Object = {};\\n obj.name = "Bob";\\n \\n return obj;\\n }\\n </pre>", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "field", | |
"qname": "summaries", | |
"return": "Array", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Array of SummaryRow instances that define the group-level summaries. Specify one or more SummaryRow instances to define the data summaries, as the following example shows: <pre>\\n <mx:AdvancedDataGrid id="myADG"\\n width="100%" height="100%"\\n initialize="gc.refresh();">\\n <mx:dataProvider>\\n <mx:GroupingCollection id="gc" source="{dpFlat}">\\n <mx:Grouping>\\n <mx:GroupingField name="Region">\\n <mx:summaries>\\n <mx:SummaryRow summaryPlacement="group">\\n <mx:fields>\\n <mx:SummaryField dataField="Actual"\\n label="Min Actual" operation="MIN"/>\\n <mx:SummaryField dataField="Actual"\\n label="Max Actual" operation="MAX"/>\\n </mx:fields>\\n </mx:SummaryRow>\\n </mx:summaries>\\n </mx:GroupingField>\\n </mx:Grouping>\\n </mx:GroupingCollection>\\n </mx:dataProvider>\\n \\n <mx:columns>\\n <mx:AdvancedDataGridColumn dataField="Region"/>\\n <mx:AdvancedDataGridColumn dataField="Territory_Rep"\\n headerText="Territory Rep"/>\\n <mx:AdvancedDataGridColumn dataField="Actual"/>\\n <mx:AdvancedDataGridColumn dataField="Estimate"/>\\n <mx:AdvancedDataGridColumn dataField="Min Actual"/>\\n <mx:AdvancedDataGridColumn dataField="Max Actual"/>\\n </mx:columns>\\n </mx:AdvancedDataGrid>\\n </pre>", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["mx.collections.SummaryRow", "mx.collections.SummaryField"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}] | |
} |