ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > DataGridColumn.sortOnHeaderRelease | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myDataGrid.getColumnAt(index).sortOnHeaderRelease
Property; a Boolean value that indicates whether the column is sorted automatically (true) or not (false) when a user clicks a header. This property can be set to true only if DataGridColumn.sortable is set to true. If DataGridColumn.sortOnHeaderRelease is set to false, you can catch the headerRelease event and perform your own sort.
The default value is true.
|
CAUTION |
The DataGrid is not editable or sortable if it is bound directly to a WebServiceConnector component or an XMLConnector component. You must bind the DataGrid component to the DataSet component and bind the DataSet component to the WebServiceConnector component or XMLConnector component if you want the grid to be editable or sortable. |
The following example disables sorting of the second column:
// Set grid attributes.
my_dg.setSize(150, 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 allow sort of the second column by clicking the header.
my_dg.getColumnAt(1).sortOnHeaderRelease = false;
|
|
|
|