DataGrid.getSelectedColumns

Overview | Methods | Fields | This Package | All Packages

DataGrid.getSelectedColumns

Retrieves the selected columns in the grid.

Syntax

public Column[] getSelectedColumns()

Return Value

Returns an array of Column objects that represent the currently selected columns. If no columns are selected, an empty array is returned.

Remarks

You can call getSelectedColumns to determine the columns that the user has selected. The user selects a column by clicking its column header. The CTRL key can be used to select multiple columns at a time.

Note   If the DataGrid control's columnHeaders property is set to false, the column headers are not displayed and the user cannot select columns.

The DataGrid control does not allow both columns and rows to be selected at the same time. If rows are selected, call getSelectedRows to determine the selected rows.

See Also   setSelectedColumns, clearSelection