Datagrid.removecolumnat() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following example removes all DataGridColumn objects from the DataGrid when the
button is clicked. With a DataGrid instance named
and a Button instance named
my_dg
on the Stage, paste the following code in the first frame of the main timeline:
clear_button
my_dg.setSize(140, 100);
my_dg.move(10, 40);
this.createClassObject(mx.controls.Button, "clear_button", 20,
{label:"Clear"});
clear_button.move(10, 10);
// Set up sample data.
var myDP_array:Array = new Array();
myDP_array.push({name:"Clark", score:3135});
myDP_array.push({name:"Bruce", score:403});
myDP_array.push({name:"Peter", score:25});
my_dg.dataProvider = myDP_array;
var buttonListener:Object = new Object();
buttonListener.click = function (evt_obj:Object) {
my_dg.removeAllColumns();
}
clear_button.addEventListener("click", buttonListener);

DataGrid.removeColumnAt()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.removeColumnAt(index)
Parameters
The index of the column to remove.
index
Returns
A reference to the DataGridColumn object that was removed.
Description
Method; removes the DataGridColumn object at the specified index.
DataGrid.removeColumnAt()
293

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents