Skip to main content

TcxCustomDataController.FocusedRowIndex Property

Specifies the row index of the record with focus.

Declaration

property FocusedRowIndex: Integer read; write;

Property Value

Type
Integer

Remarks

The FocusedRowIndex property returns the row index of the data record or grouping row currently focused. Changing the FocusedRowIndex value moves the focus to the corresponding record. The FocusedRowIndex property allows you to focus data records and grouping rows currently visible or potentially visible by scrolling (for instance, using ExpressQuantumGrid). Records hidden within collapsed data groups are not assigned row indexes and therefore cannot be focused via the FocusedRowIndex property.

You can focus a particular record by its record index via the FocusedRecordIndex property. This property allows focusing of any data records regardless of their visibility state.

Refer to the TcxCustomDataController class description for information on record and row indexes.

When synchronization between a grid control and a dataset is enabled (in bound mode implemented by the TcxDBDataController class), the focused record corresponds to the current/active record in TDataSet. In this case, dataset navigation via the TDataSet.First, TDataSet.Last, TDataSet.Next, TDataSet.Prior and TDataSet.MoveBy methods changes the focused record position. Synchronization between a grid control and a dataset is enabled if any of the following conditions are met:

  • The grid control is in grid mode, when only a fixed number of records are loaded into the memory buffer at a time. When scrolling causes a different set of records to be loaded into the buffer, the focused record automatically changes to address the corresponding record within this buffer;

  • The DataController.DataModeController.SyncMode property is set to True.

See Also