User Guide

DataGrid.showHeaders 297
Example
The following example prevents the grid from being selected. 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(140, 100);
// 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;
my_dg.selectable = false;
DataGrid.showHeaders
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.showHeaders
Description
Property; a Boolean value that indicates whether the data grid displays the column headers
(
true) or not (false). Column headers are shaded to differentiate them from the other rows
in a grid. Users can click column headers to sort the contents of the column if
DataGrid.sortableColumns is set to true. The default value of showHeaders is true.
Example
The following example hides the column headers:
my_dg.setSize(140, 100);
// Set up sample data.
my_dg.addItem({name:"Clark", score:3135});
my_dg.addItem({name:"Bruce", score:403});
my_dg.addItem({name:"Peter", score:25});
// Don't show headers.
my_dg.showHeaders = false;