ActionScript 2.0 Components Language Reference |
|
|
|
| DataGrid component > Interacting with the DataGrid component | |||
You can use the mouse and the keyboard to interact with a DataGrid component.
If DataGrid.sortableColumns and DataGridColumn.sortOnHeaderRelease are both true, clicking in a column header causes the grid to sort based on the column's cell values.
If DataGrid.resizableColumns is true, clicking in the area between columns lets you resize columns.
Clicking in an editable cell sends focus to that cell; clicking a non-editable cell has no effect on focus. An individual cell is editable when both the DataGrid.editable and DataGridColumn.editable properties of the cell are true.
When a DataGrid instance has focus either from clicking or tabbing, you can use the following keys to control it:
|
Key |
Description |
|---|---|
|
Down Arrow |
When a cell is being edited, the insertion point shifts to the end of the cell's text. If a cell is not editable, the Down Arrow key handles selection as the List component does. |
|
Up Arrow |
When a cell is being edited, the insertion point shifts to the beginning of the cell's text. If a cell is not editable, the Up Arrow key handles selection as the List component does. |
|
Right Arrow |
When a cell is being edited, the insertion point shifts one character to the right. If a cell is not editable, the Right Arrow key does nothing. |
|
Left Arrow |
When a cell is being edited, the insertion point shifts one character to the left. If a cell is not editable, the Left Arrow key does nothing. |
|
Return/Enter/Shift+Enter |
When a cell is editable, the change is committed, and the insertion point is moved to the cell on the same column, next row (up or down, depending on the shift toggle). |
|
Shift+Tab/Tab |
Moves focus to the previous item. When the Tab key is pressed, focus cycles from the last column in the grid to the first column on the next line. When Shift+Tab is pressed, cycling is reversed. All the text in the focused cell is selected. |
|
|
|
|