DataGridColumn.width

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

myDataGrid.getColumnAt(index).width

Description

Property; a number that indicates the width of the column, in pixels. The default value is 50.

Example

The following example makes the width of the first column 50 pixels:

// Create new DataProvider component.
var myDP_array:Array = new Array({name:"Chris", price:"Priceless"}, {name:"Nigel", price:"Cheap"});
//Assign DataProvider to DataGrid.
my_dg.dataProvider = myDP_array;

// Alter DataGrid dimensions.
my_dg.setSize(140, 100);
my_dg.rowHeight = 30;
my_dg.getColumnAt(0).width = 50;