Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
mx.collections 

SummaryRow  - AS3 Flex

Pacchettomx.collections
Classepublic class SummaryRow
EreditarietàSummaryRow Inheritance Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

The SummaryRow class represents a summary row of the AdvancedDataGrid. You create summary data about your data groups by using the summaries property of the GroupingField or GroupingCollection class. You display the summary data in an existing row of the AdvancedDataGrid control, or display it in a separate row.

The summaries property of the GroupingField or GroupingCollection class takes an instance of the SummaryRow class. You then use the fields property of the SummaryRow class to specify an Array of one or more SummaryField/SummaryField2 instances that define the fields of the data used to create the summary. SummaryField2 needs to be used when using GroupingCollection2.

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:SummaryField dataField="Actual" 
                    label="Min Actual" operation="MIN"/>
                  <mx:SummaryField dataField="Actual" 
                    label="Max Actual" operation="MAX"/>
                </mx:fields>
              </mx:SummaryRow>
            </mx:summaries>
          </mx:GroupingField>
          <mx:GroupingField name="Territory">
            <mx:summaries>
              <mx:SummaryRow summaryPlacement="group">
                <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: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>
  

Sintassi MXMLexpandedNascondi sintassi MXML
The <mx.SummaryRow> tag defines the following tag attributes:

  <mx:SummaryRow
  Properties 
    fields="No default"
    summaryObjectFunction="No default"
    summaryPlacement="last"
  />
  

Proprietà MXML predefinitafields

Altri esempi

Elementi API correlati



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
  fields : Array
Array of SummaryField/SummaryField2 instances that define the characteristics of the data fields used to create the summary.
SummaryRow
  summaryObjectFunction : Function
Specifies a callback function that defines the summary object, which is an instance of the SummaryObject class.
SummaryRow
  summaryPlacement : String = "last"
Specifies where the summary row appears in the AdvancedDataGrid control.
SummaryRow
Metodi pubblici
 MetodoDefinito da
  
Constructor.
SummaryRow
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
Descrizione delle proprietà

fields

proprietà
public var fields:Array

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Array of SummaryField/SummaryField2 instances that define the characteristics of the data fields used to create the summary.

Elementi API correlati

summaryObjectFunction

proprietà 
public var summaryObjectFunction:Function

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Specifies a callback function that defines the summary object, which is an instance of the SummaryObject class. The SummaryObject instance collects summary data for display in the AdvancedDataGrid control. The AdvancedDataGrid control adds the SummaryObject instance to the data provider to display the summary data in the control. Therefore, define within the SummaryObject instance the properties that you want to display.

You use this property with the SummaryField.summaryFunction property, which defines a callback function to perform the summary calculation.

The GroupingCollection class adds a property called children to the Object.

The callback function must have the following signature:

function mySumObjFunc():SummaryObject {}

Elementi API correlati

summaryPlacement

proprietà 
public var summaryPlacement:String = "last"

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Specifies where the summary row appears in the AdvancedDataGrid control. Possible values are:

  • "first" - Create a summary row as the first row in the group.
  • "last" - Create a summary row as the last row in the group.
  • "group" - Add the summary data to the row corresponding to the group.

You can specify multiple values, separated by a space. For example, a value of "last group" shows the same summary row at the group level and in the last row of the children.

Descrizione della funzione di costruzione

SummaryRow

()Funzione di costruzione
public function SummaryRow()

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Constructor.





[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.