ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > DataGrid.columnNames | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myDataGrid.columnNames
Property; an array of field names within each item that are displayed as columns.
The following example displays the column name in the Output panel when the title is clicked. With a DataGrid instance named my_dg on the Stage, paste the following code in the first frame of the main timeline:
my_dg.setSize(200, 100);
my_dg.columnNames = ["Name", "Description", "Price"];
var dgListener:Object = new Object();
dgListener.headerRelease = function (evt_obj:Object) {
trace("You clicked on the \"" + my_dg.columnNames[evt_obj.columnIndex] + "\" column.");
}
my_dg.addEventListener("headerRelease", dgListener);
|
|
|
|