ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > DataGrid.columnCount | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myDataGrid.columnCount
Property (read-only); the number of columns displayed.
The following example displays the total number of columns in the Output panel. With a DataGrid instance named my_dg on the Stage, paste the following code in the first frame of the main timeline:
// Add columns to grid and add data.
my_dg.addColumn("a");
my_dg.addColumn("b");
my_dg.addItem({a:"one", b:"two"});
// Get number of columns in grid.
var colCount_num:Number = my_dg.columnCount;
trace("Number of columns: "+colCount_num);
|
|
|
|