Pacchetto | mx.controls.dataGridClasses |
Classe | public class DataGridColumn |
Ereditarietà | DataGridColumn CSSStyleDeclaration EventDispatcher Object |
Implementa | IIMESupport |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Notes:
- A DataGridColumn only holds information about a column; it is not the parent of the item renderers in the column.
- If you specify a DataGridColumn class without a
dataField
property, you must specify asortCompareFunction
property. Otherwise, sort operations may cause run-time errors.
You use the <mx.DataGridColumn>
tag to configure a column
of a DataGrid control.
You specify the <mx.DataGridColumn>
tag as a child
of the columns property in MXML.
The <mx.DataGridColumn>
tag inherits all of the
tag attributes of its superclass, and adds the following tag attributes:
<mx:DataGridColumn Properties dataField="No default" dataTipField="No default" dataTipFunction="No default" editable="true|false" editorDataField="text" editorHeightOffset="0" editorUsesEnterKey="false|true" editorWidthOffset="0" editorXOffset="0" editorYOffset="0" headerRenderer="DataGridItemRenderer" headerText="No default" headerWordWrap="undefined" imeMode="null" itemEditor="TextInput" itemRenderer="DataGridItemRenderer" labelFunction="No default" minWidth="20" rendererIsEditor="false|true" resizable="true|false" showDataTips="false|true" sortable="true|false" sortCompareFunction="No default" sortDescending="false|true" visible="true|false" width="100" wordWrap="false|true" Styles backgroundColor="0xFFFFFF" color="No default." disabledColor="0xAAB3B3" fontAntiAliasType="advanced" fontFamily="No default" fontGridFitType="pixel" fontSharpness="0" fontSize="No default" fontStyle="normal|italic" fontThickness="0" fontWeight="normal|bold" headerStyleName="No default" paddingLeft="0" paddingRight="0" textAlign="right|center|left" textDecoration="none|underline" textIndent="0" />
Elementi API correlati
Proprietà | Definito da | ||
---|---|---|---|
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
dataField : String
The name of the field or property in the data provider item associated
with the column. | DataGridColumn | ||
dataTipField : String
The name of the field in the data provider to display as the datatip. | DataGridColumn | ||
dataTipFunction : Function
Specifies a callback function to run on each item of the data provider
to determine its dataTip. | DataGridColumn | ||
defaultFactory : Function
This function, if it isn't null,
is usually autogenerated by the MXML compiler. | CSSStyleDeclaration | ||
draggable : Boolean = true
A flag that indicates whether the user is allowed to drag
the column to a new position
If true, the user can drag the
the column headers to a new position
| DataGridColumn | ||
editable : Boolean
A flag that indicates whether the items in the column are editable. | DataGridColumn | ||
editorDataField : String = "text"
The name of the property of the item editor that contains the new
data for the list item. | DataGridColumn | ||
editorHeightOffset : Number = 0
The height of the item editor, in pixels, relative to the size of the
item renderer. | DataGridColumn | ||
editorUsesEnterKey : Boolean = false
A flag that indicates whether the item editor uses Enter key. | DataGridColumn | ||
editorWidthOffset : Number = 0
The width of the item editor, in pixels, relative to the size of the
item renderer. | DataGridColumn | ||
editorXOffset : Number = 0
The x location of the upper-left corner of the item editor,
in pixels, relative to the upper-left corner of the item. | DataGridColumn | ||
editorYOffset : Number = 0
The y location of the upper-left corner of the item editor,
in pixels, relative to the upper-left corner of the item. | DataGridColumn | ||
enableIME : Boolean [sola lettura]
A flag that indicates whether the IME should
be enabled when the component receives focus. | DataGridColumn | ||
factory : Function
This function, if it isn't null,
is usually autogenerated by the MXML compiler. | CSSStyleDeclaration | ||
headerRenderer : IFactory
The class factory for item renderer instances that display the
column header for the column. | DataGridColumn | ||
headerText : String
Text for the header of this column. | DataGridColumn | ||
headerWordWrap : *
A flag that indicates whether text in the header will be
word wrapped if it doesn't fit on one line. | DataGridColumn | ||
imeMode : String
Specifies the IME (input method editor) mode. | DataGridColumn | ||
itemEditor : IFactory
A class factory for the instances of the item editor to use for the
column, when it is editable. | DataGridColumn | ||
itemRenderer : IFactory
The class factory for item renderer instances that display the
data for each item in the column. | DataGridColumn | ||
labelFunction : Function
A function that determines the text to display in this column. | DataGridColumn | ||
minWidth : Number
The minimum width of the column. | DataGridColumn | ||
nullItemRenderer : IFactory
The class factory for item renderer instances that display the
data for each item in the column. | DataGridColumn | ||
overrides : Object
If the setStyle() method is called on a UIComponent or CSSStyleDeclaration
at run time, this object stores the name/value pairs that were set;
they override the name/value pairs in the objects produced by
the methods specified by the defaultFactory and
factory properties. | CSSStyleDeclaration | ||
rendererIsEditor : Boolean = false
A flag that indicates that the item renderer is also an item editor. | DataGridColumn | ||
resizable : Boolean = true
A flag that indicates whether the user is allowed to resize
the width of the column. | DataGridColumn | ||
selector : CSSSelector
This property is the base selector of a potential chain of selectors
and conditions that are used to match CSS style declarations to
components. | CSSStyleDeclaration | ||
selectorIndex : int = 0
The order this CSSStyleDeclaration was added to its StyleManager. | CSSStyleDeclaration | ||
showDataTips : *
A flag that indicates whether the datatips are shown in the column. | DataGridColumn | ||
sortable : Boolean = true
A flag that indicates whether the user can click on the
header of this column to sort the data provider. | DataGridColumn | ||
sortCompareFunction : Function
A callback function that gets called when sorting the data in
the column. | DataGridColumn | ||
sortDescending : Boolean = false
Indicates whether the column sort is
in ascending order, false,
or descending order, true. | DataGridColumn | ||
specificity : int [sola lettura]
Determines the order of precedence when applying multiple style
declarations to a component. | CSSStyleDeclaration | ||
subject : String [sola lettura]
The subject describes the name of a component that may be a potential
match for this style declaration. | CSSStyleDeclaration | ||
visible : Boolean
A flag that indicates whethe the column is visible. | DataGridColumn | ||
width : Number
The width of the column, in pixels. | DataGridColumn | ||
wordWrap : *
A flag that indicates whether the text in a row of this column
is word wrapped if it doesn't fit on one line. | DataGridColumn |
Metodo | Definito da | ||
---|---|---|---|
DataGridColumn(columnName:String = null)
Constructor. | DataGridColumn | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | ||
Clears a style property on this CSSStyleDeclaration. | CSSStyleDeclaration | ||
Invia un evento nel flusso di eventi. | EventDispatcher | ||
Return the appropriate factory, using the default factory if none specified. | DataGridColumn | ||
Gets the value for a specified style property,
as determined solely by this CSSStyleDeclaration. | CSSStyleDeclaration | ||
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | ||
Indica se per un oggetto è definita una proprietà specifica. | Object | ||
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | ||
Returns a String that the item renderer displays as the datatip for the given data object,
based on the dataTipField and dataTipFunction properties. | DataGridColumn | ||
Returns the String that the item renderer displays for the given data object. | DataGridColumn | ||
Determines whether this style declaration applies to the given component
based on a match of the selector chain. | CSSStyleDeclaration | ||
Indica se la proprietà specificata esiste ed è enumerabile. | Object | ||
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | ||
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | ||
Sets a style property on this CSSStyleDeclaration. | CSSStyleDeclaration | ||
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | ||
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | ||
Restituisce il valore di base dell'oggetto specificato. | Object | ||
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher |
Gli stili sono di tipo comune oppure associati a un tema specifico. Se lo stile è comune, può essere utilizzato con qualunque tema. Se è associato a un tema specifico, può essere utilizzato solo se la vostra applicazione ne fa uso.
Stile | Descrizione | Definito da | ||
---|---|---|---|---|
backgroundColor | Tipo: uint Formato: Color Ereditarietà CSS: No Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 The Background color of the column. The default value is undefined , which means it uses the value of the
backgroundColor style of the associated DataGrid control.
The default value for the DataGrid control is 0xFFFFFF .
| DataGridColumn | ||
color | Tipo: uint Formato: Color Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Color of text in the component, including the component label. The default value for the Halo theme is 0x0B333C .
The default value for the Spark theme is 0x000000 .
| DataGridColumn | ||
direction | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 4 Versioni runtime: Flash10, AIR 1.5 The directionality of the text displayed by the component. The allowed values are FTE and TLF use this value in their bidirectional text layout algorithm, which maps Unicode character order to glyph order. Note: This style only applies when an MX component
specifies UIFTETextField as its The "ltr" . | DataGridColumn | ||
disabledColor | Tipo: uint Formato: Color Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Color of text in the component if it is disabled. Il valore predefinito è 0xAAB3B3 . | DataGridColumn | ||
fontAntiAliasType | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Sets the antiAliasType property of internal TextFields. The possible values are
"normal" (flash.text.AntiAliasType.NORMAL )
and "advanced" (flash.text.AntiAliasType.ADVANCED ).
The default value is This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you cannot apply it to some characters and not others. Il valore predefinito è "advanced" .Elementi API correlati | DataGridColumn | ||
fontFamily | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Name of the font to use. Unlike in a full CSS implementation, comma-separated lists are not supported. You can use any font family name. If you specify a generic font name, it is converted to an appropriate device font. The default font for the Halo theme is "Verdana" .
The default font for the Spark theme is "Arial" .
| DataGridColumn | ||
fontGridFitType | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Sets the gridFitType property of internal TextFields that represent text in Flex controls.
The possible values are "none" (flash.text.GridFitType.NONE ),
"pixel" (flash.text.GridFitType.PIXEL ),
and "subpixel" (flash.text.GridFitType.SUBPIXEL ).
This property only applies when you are using an embedded font
and the This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. Il valore predefinito è "pixel" .Elementi API correlati | DataGridColumn | ||
fontSharpness | Tipo: Number Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Sets the sharpness property of internal TextFields that represent text in Flex controls.
This property specifies the sharpness of the glyph edges. The possible values are Numbers
from -400 through 400.
This property only applies when you are using an embedded font
and the This style has no effect for system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. Il valore predefinito è 0 .Elementi API correlati | DataGridColumn | ||
fontSize | Tipo: Number Formato: Length Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Height of the text, in pixels. In the Halo theme, the default value is 10 for all controls except the ColorPicker control. For the Halo themed ColorPicker control, the default value is 11. In the Spark theme, the default value is 12 for all controls except the ColorPicker control. For the Spark themed ColorPicker control, the default value is 11. | DataGridColumn | ||
fontStyle | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Determines whether the text is italic font. Recognized values are "normal" and "italic" .
Il valore predefinito è "normal" . | DataGridColumn | ||
fontThickness | Tipo: Number Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Sets the thickness property of internal TextFields that represent text in Flex controls.
This property specifies the thickness of the glyph edges.
The possible values are Numbers from -200 to 200.
This property only applies when you are using an embedded font
and the This style has no effect on system fonts. This style applies to all the text in a TextField subcontrol; you can't apply it to some characters and not others. Il valore predefinito è 0 .Elementi API correlati | DataGridColumn | ||
fontWeight | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Determines whether the text is boldface. Recognized values are normal and bold .
The default value for Button controls is bold .
The default value for all other controls is normal .
| DataGridColumn | ||
headerStyleName | Tipo: String Ereditarietà CSS: No Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 The name of a CSS style declaration for controlling other aspects of the appearance of the column headers. The default value is undefined , which means it uses the value of the
headerStyleName style of the associated DataGrid control.
The default value for the DataGrid control is
".dataGridStyles" .
| DataGridColumn | ||
kerning | Tipo: Boolean Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 A Boolean value that indicates whether kerning is enabled ( true ) or disabled (false ).
Kerning adjusts the gap between certain character pairs
to improve readability, and should be used only when necessary,
such as with headings in large fonts.
Kerning is supported for embedded fonts only.
Certain fonts, such as Verdana, and monospaced fonts,
such as Courier New, do not support kerning.
Il valore predefinito è false . | DataGridColumn | ||
letterSpacing | Tipo: Number Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 The number of additional pixels to appear between each character. A positive value increases the character spacing beyond the normal spacing, while a negative value decreases it. Il valore predefinito è 0 . | DataGridColumn | ||
locale | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 4 Versioni runtime: Flash10, AIR 1.5 The locale of the text displayed by this component. FTE and TLF use this locale to map Unicode characters to font glyphs and to find fallback fonts. Note: This style only applies when an MX component
specifies UIFTETextField as its "en" . | DataGridColumn | ||
paddingLeft | Tipo: Number Formato: Length Ereditarietà CSS: No Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 The number of pixels between the container's left border and its content area. Il valore predefinito è 0 . | DataGridColumn | ||
paddingRight | Tipo: Number Formato: Length Ereditarietà CSS: No Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 The number of pixels between the container's right border and its content area. Il valore predefinito è 0 . | DataGridColumn | ||
textAlign | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Alignment of text within a container. Possible values are "left" , "right" ,
or "center" .
The default value for most components is | DataGridColumn | ||
textDecoration | Tipo: String Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Determines whether the text is underlined. Possible values are "none" and "underline" .
Il valore predefinito è "none" . | DataGridColumn | ||
textFieldClass | Tipo: Class Ereditarietà CSS: No Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 4 Versioni runtime: Flash10, AIR 1.5 The class implementing IUITextField that is used by this component to render text. It can be set to either the mx.core.UITextField class (to use the classic TextField class built into Flash Player) or the mx.core.UIFTETextField class (to use the Text Layout Framework to get improved text rendering, including bidirectional layout). Il valore predefinito è mx.core.UITextField . | DataGridColumn | ||
textIndent | Tipo: Number Formato: Length Ereditarietà CSS: Sì Versione linguaggio: ActionScript 3.0 Versione prodotto: Flex 3 Versioni runtime: Flash9, AIR 1.1 Offset of first line of text from the left side of the container, in pixels. Il valore predefinito è 0 . | DataGridColumn |
dataField | proprietà |
dataField:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The name of the field or property in the data provider item associated
with the column.
Each DataGridColumn control
requires this property and/or the labelFunction
property
to be set in order to calculate the displayable text for the item
renderer.
If the dataField
and labelFunction
properties are set,
the data is displayed using the labelFunction
and sorted
using the dataField
. If the property named in the
dataField
does not exist, the
sortCompareFunction
must be set for the sort to work
correctly.
This value of this property is not necessarily the String that
is displayed in the column header. This property is
used only to access the data in the data provider.
For more information, see the headerText
property.
Implementazione
public function get dataField():String
public function set dataField(value:String):void
Elementi API correlati
dataTipField | proprietà |
dataTipField:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The name of the field in the data provider to display as the datatip.
By default, the DataGrid control looks for a property named
label
on each data provider item and displays it.
However, if the data provider does not contain a label
property, you can set the dataTipField
property to
specify a different property.
For example, you could set the value to "FullName" when a user views a
set of people's names included from a database.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento dataTipFieldChanged
.
Implementazione
public function get dataTipField():String
public function set dataTipField(value:String):void
dataTipFunction | proprietà |
dataTipFunction:Function
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Specifies a callback function to run on each item of the data provider
to determine its dataTip.
This property is used by the itemToDataTip
method.
By default the control looks for a property named label
on each data provider item and displays it as its dataTip.
However, some data providers do not have a label
property
nor do they have another property that you can use for displaying data
in the rows.
For example, you might have a data provider that contains a lastName
and firstName fields, but you want to display full names as the dataTip.
You can specify a function to the dataTipFunction
property
that returns a single String containing the value of both fields. You
can also use the dataTipFunction
property for handling
formatting and localization.
The function must take a single Object parameter, containing the data provider element, and return a String.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento dataTipFunctionChanged
.
Implementazione
public function get dataTipFunction():Function
public function set dataTipFunction(value:Function):void
draggable | proprietà |
public var draggable:Boolean = true
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the user is allowed to drag
the column to a new position
If true
, the user can drag the
the column headers to a new position
Il valore predefinito è true.
editable | proprietà |
editable:Boolean
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the items in the column are editable.
If true
, and the DataGrid's editable
property is also true
, the items in a column are
editable and can be individually edited
by clicking on an item or by navigating to the item by using the
Tab and Arrow keys.
Il valore predefinito è true.
Implementazione
public function get editable():Boolean
public function set editable(value:Boolean):void
editorDataField | proprietà |
public var editorDataField:String = "text"
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The name of the property of the item editor that contains the new
data for the list item.
For example, the default itemEditor
is
TextInput, so the default value of the editorDataField
property is "text"
, which specifies the
text
property of the TextInput control.
Il valore predefinito è "text".
editorHeightOffset | proprietà |
public var editorHeightOffset:Number = 0
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The height of the item editor, in pixels, relative to the size of the item renderer. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.
Il valore predefinito è 0.
editorUsesEnterKey | proprietà |
public var editorUsesEnterKey:Boolean = false
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the item editor uses Enter key.
If true
the item editor uses the Enter key and the
DataGrid will not look for the Enter key and move the editor in
response.
Note that changing this value while the editor is displayed
will have no effect on the current editor, but will affect the next
item renderer that opens an editor.
Il valore predefinito è false..
editorWidthOffset | proprietà |
public var editorWidthOffset:Number = 0
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The width of the item editor, in pixels, relative to the size of the item renderer. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.
Il valore predefinito è 0.
editorXOffset | proprietà |
public var editorXOffset:Number = 0
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The x location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.
Il valore predefinito è 0.
editorYOffset | proprietà |
public var editorYOffset:Number = 0
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The y location of the upper-left corner of the item editor, in pixels, relative to the upper-left corner of the item. This property can be used to make the editor overlap the item renderer by a few pixels to compensate for a border around the editor. Note that changing these values while the editor is displayed will have no effect on the current editor, but will affect the next item renderer that opens an editor.
Il valore predefinito è 0.
enableIME | proprietà |
enableIME:Boolean
[sola lettura] Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 4 |
Versioni runtime: | Flash Player 10, AIR 1.5 |
A flag that indicates whether the IME should be enabled when the component receives focus. If an editor is up, it will set enableIME accordingly.
Implementazione
public function get enableIME():Boolean
headerRenderer | proprietà |
headerRenderer:IFactory
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The class factory for item renderer instances that display the column header for the column. You can specify a drop-in item renderer, an inline item renderer, or a custom item renderer component as the value of this property.
The default item renderer is the DataGridItemRenderer class, which displays the item data as text.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento headerRendererChanged
.
Implementazione
public function get headerRenderer():IFactory
public function set headerRenderer(value:IFactory):void
headerText | proprietà |
headerText:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Text for the header of this column. By default, the DataGrid
control uses the value of the dataField
property
as the header text.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento headerTextChanged
.
Implementazione
public function get headerText():String
public function set headerText(value:String):void
headerWordWrap | proprietà |
headerWordWrap:*
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether text in the header will be
word wrapped if it doesn't fit on one line.
If undefined
, the DataGrid control's wordWrap
property
is used.
Il valore predefinito è undefined.
Implementazione
public function get headerWordWrap():*
public function set headerWordWrap(value:any):void
imeMode | proprietà |
imeMode:String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Specifies the IME (input method editor) mode.
The IME enables users to enter text in Chinese, Japanese, and Korean.
Flex sets the IME mode when the itemFocusIn
event occurs,
and sets it back
to the previous value when the itemFocusOut
event occurs.
The flash.system.IMEConversionMode class defines constants for
the valid values for this property.
The default value is null, in which case it uses the value of the
DataGrid control's imeMode
property.
Implementazione
public function get imeMode():String
public function set imeMode(value:String):void
Elementi API correlati
itemEditor | proprietà |
public var itemEditor:IFactory
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A class factory for the instances of the item editor to use for the column, when it is editable.
Il valore predefinito è new ClassFactory(mx.controls.TextInput).
Altri esempi
itemRenderer | proprietà |
itemRenderer:IFactory
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The class factory for item renderer instances that display the data for each item in the column. You can specify a drop-in item renderer, an inline item renderer, or a custom item renderer component as the value of this property.
The default item renderer is the DataGridItemRenderer class, which displays the item data as text.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento itemRendererChanged
.
Implementazione
public function get itemRenderer():IFactory
public function set itemRenderer(value:IFactory):void
labelFunction | proprietà |
labelFunction:Function
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A function that determines the text to display in this column. By default
the column displays the text for the field in the data that matches the
column name. However, sometimes you want to display text based on
more than one field in the data, or display something that does not
have the format that you want.
In such a case you specify a callback function using labelFunction
.
For the DataGrid control, the method signature has the following form:
labelFunction(item:Object, column:DataGridColumn):String
Where item
contains the DataGrid item object, and
column
specifies the DataGrid column.
A callback function might concatenate the firstName and lastName fields in the data, or do some custom formatting on a Date, or convert a number for the month into the string for the month.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento labelFunctionChanged
.
Implementazione
public function get labelFunction():Function
public function set labelFunction(value:Function):void
minWidth | proprietà |
minWidth:Number
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The minimum width of the column.
Il valore predefinito è 20.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento minWidthChanged
.
Implementazione
public function get minWidth():Number
public function set minWidth(value:Number):void
nullItemRenderer | proprietà |
nullItemRenderer:IFactory
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The class factory for item renderer instances that display the data for each item in the column. You can specify a drop-in item renderer, an inline item renderer, or a custom item renderer component as the value of this property.
The default item renderer is the DataGridItemRenderer class, which displays the item data as text.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento nullItemRendererChanged
.
Implementazione
public function get nullItemRenderer():IFactory
public function set nullItemRenderer(value:IFactory):void
rendererIsEditor | proprietà |
public var rendererIsEditor:Boolean = false
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates that the item renderer is also an item editor.
If this property is true
, Flex
ignores the itemEditor
property and uses the item
renderer for that item as the editor.
Il valore predefinito è false.
resizable | proprietà |
public var resizable:Boolean = true
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the user is allowed to resize
the width of the column.
If true
, the user can drag the grid lines between
the column headers to resize
the column.
Il valore predefinito è true.
showDataTips | proprietà |
showDataTips:*
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the datatips are shown in the column.
If true
, datatips are displayed for text in the rows. Datatips
are tooltips designed to show the text that is too long for the row.
Il valore predefinito è false.
Implementazione
public function get showDataTips():*
public function set showDataTips(value:any):void
sortable | proprietà |
public var sortable:Boolean = true
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the user can click on the
header of this column to sort the data provider.
If this property and the DataGrid sortableColumns
property
are both true
, the DataGrid control dispatches a
headerRelease
event when a user releases the mouse button
on this column's header.
If no other handler calls the preventDefault()
method on
the headerRelease
event, the dataField
property or sortCompareFunction
in the column is used
to reorder the items in the dataProvider.
Il valore predefinito è true.
sortCompareFunction | proprietà |
sortCompareFunction:Function
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A callback function that gets called when sorting the data in
the column. If this property is not specified, the sort tries
to use a basic string or number sort on the data.
If the data is not a string or number or if the dataField
property is not a valid property of the data provider, the sort does
not work or will generate an exception.
If you specify a value of the labelFunction
property,
you typically also provide a function to the sortCompareFunction
property,
unless sorting is not allowed on this column.
That means you specify a function when the value from the column's dataField
does not sort in the same way as the computed value from the labelFunction
property.
The DataGrid control uses this function to sort the elements of the data provider collection. The function signature of the callback function takes two parameters and have the following form:
mySortCompareFunction(obj1:Object, obj2:Object):int
obj1
— A data element to compare.
obj2
— Another data element to compare with obj1.
The function should return a value based on the comparison of the objects:
- -1 if obj1 should appear before obj2 in ascending order.
- 0 if obj1 = obj2.
- 1 if obj1 should appear after obj2 in ascending order.
Note: The obj1
and
obj2
parameters are entire data provider elements and not
just the data for the item.
Il valore predefinito è null.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento sortCompareFunctionChanged
.
Implementazione
public function get sortCompareFunction():Function
public function set sortCompareFunction(value:Function):void
sortDescending | proprietà |
public var sortDescending:Boolean = false
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Indicates whether the column sort is
in ascending order, false
,
or descending
order, true.
Setting this property does not start a sort; it only sets the sort direction. Click on the column header to perform the sort.
Il valore predefinito è false;.
visible | proprietà |
visible:Boolean
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whethe the column is visible.
If true
, the column is visible.
Il valore predefinito è true.
Implementazione
public function get visible():Boolean
public function set visible(value:Boolean):void
width | proprietà |
width:Number
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
The width of the column, in pixels.
If the DataGrid's horizontalScrollPolicy
property
is false
, all visible columns must fit in the displayable
area, and the DataGrid will not always honor the width of
the columns if the total width of the columns is too
small or too large for the displayable area.
Il valore predefinito è 100.
Questa proprietà può essere utilizzata come origine per l’associazione di dati. Quando questa proprietà viene modificata, invia l’evento widthChanged
.
Implementazione
public function get width():Number
public function set width(value:Number):void
wordWrap | proprietà |
wordWrap:*
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A flag that indicates whether the text in a row of this column
is word wrapped if it doesn't fit on one line.
If undefined
, the DataGrid control's wordWrap
property
is used.
Only takes effect if the DataGrid.variableRowHeight
property is also
true
.
Il valore predefinito è undefined.
Implementazione
public function get wordWrap():*
public function set wordWrap(value:any):void
DataGridColumn | () | Funzione di costruzione |
public function DataGridColumn(columnName:String = null)
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Constructor.
ParametricolumnName:String (default = null ) — The name of the field in the data provider
associated with the column, and the text for the header cell of this
column. This is equivalent to setting the dataField
and headerText properties.
|
getItemRendererFactory | () | metodo |
public function getItemRendererFactory(forHeader:Boolean, data:Object):IFactory
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Return the appropriate factory, using the default factory if none specified.
Parametri
forHeader:Boolean — true if this is a header renderer.
| |
data:Object — The data to be presented by the item renderer.
|
IFactory — if data is null, the default item renderer,
otherwis it returns the custom item renderer.
|
itemToDataTip | () | metodo |
public function itemToDataTip(data:Object):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Returns a String that the item renderer displays as the datatip for the given data object,
based on the dataTipField
and dataTipFunction
properties.
If the method cannot convert the parameter to a String, it returns a
single space.
This method is for use by developers who are creating subclasses of the DataGridColumn class. It is not for use by application developers.
Parametri
data:Object — Object to be rendered.
|
String — Displayable String based on the data.
|
itemToLabel | () | metodo |
public function itemToLabel(data:Object):String
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Returns the String that the item renderer displays for the given data object.
If the DataGridColumn or its DataGrid control
has a non-null labelFunction
property, it applies the function to the data object.
Otherwise, the method extracts the contents of the field specified by the
dataField
property, or gets the string value of the data object.
If the method cannot convert the parameter to a String, it returns a
single space.
Parametri
data:Object — Object to be rendered.
|
String — Displayable String based on the data.
|
Tue Jun 12 2018, 02:44 PM Z