패키지 | mx.collections |
클래스 | public class SummaryField2 |
상속 | SummaryField2 Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Note: In the previous release of Flex, you used the SummaryField class to create summary data. The SummaryField2 class is new for Flex 4 and provides better performance than SummaryField.
Use the dataField
property to specify the data field used to generate the summary,
the label
property to specify the name of the data field created to hold the summary data,
and the summaryOperation
property to specify how to create the summary for numeric fields.
You can specify one of the following values:
SUM
, MIN
, MAX
, AVG
, or COUNT
.
The following example creates summary rows based on two fields of the data provider of the AdvancedDataGrid control:
<mx:AdvancedDataGrid id="myADG" initialize="gc.refresh();"> <mx:dataProvider> <mx:GroupingCollection id="gc" source="{dpFlat}"> <mx:Grouping> <mx:GroupingField name="Region"> <mx:summaries> <mx:SummaryRow summaryPlacement="group"> <mx:fields> <mx:SummaryField2 dataField="Actual" label="Min Actual" summaryOperation="MIN"/> <mx:SummaryField2 dataField="Actual" label="Max Actual" summaryOperation="MAX"/> </mx:fields> </mx:SummaryRow> </mx:summaries> </mx:GroupingField> <mx:GroupingField name="Territory"> <mx:summaries> <mx:SummaryRow summaryPlacement="group"> <mx:fields> <mx:SummaryField2 dataField="Actual" label="Min Actual" summaryOperation="MIN"/> <mx:SummaryField2 dataField="Actual" label="Max Actual" summaryOperation="MAX"/> </mx:fields> </mx:SummaryRow> </mx:summaries> </mx:GroupingField> </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>MXML 구문MXML 구문 숨기기
<mx.SummaryField2>
inherits all the tag attributes of its superclass,
and defines the following tag attributes:
<mx:SummaryField2 Properties dataField="No default" label="No default" summaryOperation="SUM" />
기타 예제
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
dataField : String
Data field for which the summary is computed. | SummaryField2 | ||
label : String
The property used inside the summary object,
an instance of the SummaryObject class, to
hold summary information. | SummaryField2 | ||
summaryOperation : Object = SUM
The summary performed on the children. | SummaryField2 |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | SummaryField2 | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object |
dataField | 속성 |
public var dataField:String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Data field for which the summary is computed.
label | 속성 |
public var label:String
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4 |
런타임 버전: | Flash Player 10, AIR 1.5 |
The property used inside the summary object, an instance of the SummaryObject class, to hold summary information.
For example, if you set the label
property to "Summary",
then the computed summary is placed in a property named "Summary"
in the summary object. The property of the SummaryObject instance
containing the summary data will appear as below:
{Summary:1000}
관련 API 요소
summaryOperation | 속성 |
public var summaryOperation:Object = SUM
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4 |
런타임 버전: | Flash Player 10, AIR 1.5 |
The summary performed on the children. The value of this property can be one of the following:
- For numeric fields:
SUM
,MIN
,MAX
,AVG
, orCOUNT
. - An instance of a class that implements the custom ISummaryCalculator interface to calculate a custom summary.
기본값: SUM.
관련 API 요소
SummaryField2 | () | 생성자 |
public function SummaryField2(dataField:String = null, summaryOperation:Object = SUM)
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4 |
런타임 버전: | Flash Player 10, AIR 1.5 |
Constructor.
매개 변수dataField:String (default = null ) — Data field for which the summary is computed.
| |
summaryOperation:Object (default = SUM ) — The function that should be performed on the children.
You can specify one of the following values for numeric fields:
SUM , MIN , MAX , AVG , or COUNT .
Or you can specify an ISummaryCalculator implementation to calculate the summaries.
|
Tue Jun 12 2018, 03:17 PM Z