DataType.formatter

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

dataTypeObject.formatter

Description

Property; provides a reference to the formatter object associated with this field, if one exists. You can use this property to access any properties and methods for the formatter object applied to the field in the Component inspector's Schema tab.

If no formatter was applied to the field in question, this property returns undefined.

Example

This example assumes that the field being accessed is using the Number Formatter (mx.data.formatters.NumberFormatter) provided with Flash. This formatter contains a property named precision that specifies how many digits to display after the decimal point. This code sets the precision property to two decimal places for a field using this formatter.

var myField:DataType = dataGrid.getField("currentBalance");
myField.formatter.precision = 2;

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002693.html