blob: d0cac4f5cc6a99565cb9e938cd06765d251bc2ec [file] [log] [blame]
{ "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 &lt;mx:AdvancedDataGrid id=&quot;myADG&quot;\\n &lt;mx:dataProvider&gt;\\n &lt;mx:GroupingCollection id=&quot;gc&quot; source=&quot;{dpFlat}&quot;&gt;\\n &lt;mx:grouping&gt;\\n &lt;mx:Grouping&gt;\\n &lt;mx:GroupingField name=&quot;Region&quot;/&gt;\\n &lt;mx:GroupingField name=&quot;Territory&quot;/&gt;\\n &lt;/mx:Grouping&gt;\\n &lt;/mx:grouping&gt;\\n &lt;/mx:GroupingCollection&gt;\\n &lt;/mx:dataProvider&gt;\\n \\n &lt;mx:columns&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Region&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Territory&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;/&gt;\\n &lt;/mx:columns&gt;\\n &lt;/mx:AdvancedDataGrid&gt;\\n </pre> The <code>&lt;mx.GroupingField&gt;</code> inherits all the tag attributes of its superclass, and defines the following tag attributes:</p> <pre>\\n &lt;mx:GroupingField\\n <b>Properties </b>\\n caseInsensitive=&quot;false|true&quot;\\n compareFunction=&quot;<i>No default</i>&quot;\\n descending=&quot;false|true&quot;\\n groupingFunction=&quot;<i>No default</i>&quot;\\n groupingObjectFunction=&quot;<i>No default</i>&quot;\\n name=&quot;null&quot;\\n numeric=&quot;false|true&quot;\\n summaries=&quot;<i>No default</i>&quot;\\n /&gt;\\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 &quot;1&quot; is a lower string value than &quot;9&quot;.",
"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 &quot;name&quot; property with value as &quot;Bob&quot; can be written as - <pre>\\n private function groupObjFunction(label:String):Object\\n {\\n var obj:Object = {};\\n obj.name = &quot;Bob&quot;;\\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 &lt;mx:AdvancedDataGrid id=&quot;myADG&quot;\\n width=&quot;100%&quot; height=&quot;100%&quot;\\n initialize=&quot;gc.refresh();&quot;&gt;\\n &lt;mx:dataProvider&gt;\\n &lt;mx:GroupingCollection id=&quot;gc&quot; source=&quot;{dpFlat}&quot;&gt;\\n &lt;mx:Grouping&gt;\\n &lt;mx:GroupingField name=&quot;Region&quot;&gt;\\n &lt;mx:summaries&gt;\\n &lt;mx:SummaryRow summaryPlacement=&quot;group&quot;&gt;\\n &lt;mx:fields&gt;\\n &lt;mx:SummaryField dataField=&quot;Actual&quot;\\n label=&quot;Min Actual&quot; operation=&quot;MIN&quot;/&gt;\\n &lt;mx:SummaryField dataField=&quot;Actual&quot;\\n label=&quot;Max Actual&quot; operation=&quot;MAX&quot;/&gt;\\n &lt;/mx:fields&gt;\\n &lt;/mx:SummaryRow&gt;\\n &lt;/mx:summaries&gt;\\n &lt;/mx:GroupingField&gt;\\n &lt;/mx:Grouping&gt;\\n &lt;/mx:GroupingCollection&gt;\\n &lt;/mx:dataProvider&gt;\\n \\n &lt;mx:columns&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Region&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;\\n headerText=&quot;Territory Rep&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Min Actual&quot;/&gt;\\n &lt;mx:AdvancedDataGridColumn dataField=&quot;Max Actual&quot;/&gt;\\n &lt;/mx:columns&gt;\\n &lt;/mx:AdvancedDataGrid&gt;\\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"]} ]}]
}