DataGrid.getColumnAt()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.getColumnAt(index)
Parameters
The index of the DataGridColumn object to be returned. This number is zero-based.
index
Returns
A DataGridColumn object.
Description
Method; gets a reference to the DataGridColumn object at the specified index.
Example
The following example gets the DataGridColumn object at index 0 and changes the text.
With a DataGrid instance named
paste the following code in the first frame of the main timeline:
my_dg.setSize(140, 100);
// Set up sample data.
my_dg.dataProvider = [{name:"Clark", score:3135}, {name:"Bruce",
score:403}, {name:"Peter", score:25}];
// Create listener object.
var btnListener:Object = new Object();
btnListener.click = function() {
// Get column at location 0.
var a_dgc = my_dg.getColumnAt(0);
// Change header text.
a_dgc.headerText = "c";
};
// Add button listener.
my_btn.addEventListener("click", btnListener);
and a Button instance named
my_dg
on the Stage,
my_btn
DataGrid.getColumnAt()
287
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers