Skip to main content

TcxCustomGridTableController.FocusNextCell(Boolean,Boolean,Boolean,Boolean,Boolean) Method

Focuses the cell/record next to or prior to the current one.

Declaration

function FocusNextCell(AGoForward: Boolean; AProcessCellsOnly: Boolean = True; AAllowCellsCycle: Boolean = True; AFollowVisualOrder: Boolean = True; ANeedNormalizeSelection: Boolean = False): Boolean; virtual;

Parameters

Name Type
AGoForward Boolean
AProcessCellsOnly Boolean
AAllowCellsCycle Boolean
AFollowVisualOrder Boolean
ANeedNormalizeSelection Boolean

Returns

Type
Boolean

Remarks

You can use the FocusNextCell function to navigate through the cells within the current View. The FocusNextCell function calls the FocusNextItem method to implement its functionality.

The AGoForward parameter specifies whether the next or previous cell is focused.

The AAllowCellsCycle parameter indicates whether the FocusNextCell function can move focus to the next/previous row after it passes the rightmost/leftmost cell within the current row and cell focus cycling is enabled (the View’s OptionsBehavior.FocusCellOnCycle property is set to True). If this property is set to True and AGoForward is True, the FocusNextCell function moves focus to the next record when passing the last cell in the current record. If AGoForward is set to False, the previous record is focused.

The AProcessCellsOnly parameter specifies the function’s behavior when cell selection is disabled (the View’s OptionsSelection.CellSelect property set to False). In this case, navigation fails if the AProcessCellsOnly parameter is set to True or cell focus cycling is disabled (the View’s OptionsBehavior.FocusCellOnCycle property is set to False). Otherwise, the next/previous record (depends on the AGoForward parameter’s value) is focused.

AFollowVisualOrder specifies whether items are traversed according to the View’s layout. Set AFollowVisualOrder to True to search items in visual order (across from left to right and then down). False passed as this parameter is in effect only in Banded Table Views, where the search is performed in the same manner, but band-by-band.

The FocusNextCell function returns True if the focusable cell (or record in case the cell selection is disabled) was found. Otherwise, False is returned.

See Also