Back to Devexpress

TcxCustomGridTableController.SelectedRecords Property

vcl-cxgridcustomtableview-dot-tcxcustomgridtablecontroller-e77bb62c.md

latest3.1 KB
Original Source

TcxCustomGridTableController.SelectedRecords Property

Provides indexed access to selected records.

Declaration

delphi
property SelectedRecords[Index: Integer]: TcxCustomGridRecord read;

Property Value

Type
TcxCustomGridRecord

Remarks

Use the SelectedRecords property to obtain selected records when GridMode is not applied.

When GridMode is applied to a data-aware View, you can get selected records via the View’s DataController.GetSelectedBookmark function. This returns a TBookmarkStr object which can be used in the dataset’s GotoBookmark method, for instance.

The number of records is defined by the SelectedRecordCount property.

To enable a user to select multiple records, set the View’s OptionsSelection.MultiSelect property to True. The Focused/Selected Records section gives you more information relating to this topic.

See Also

TcxCustomDataController.ForEachRow

TcxCustomGridTableController.ClearSelection

TcxCustomGridTableController.DeleteSelection

TcxCustomGridTableController.FocusedRecord

TcxCustomGridTableController.SelectedRecordCount

TcxCustomGridTableOptionsSelection.MultiSelect

TcxCustomGridTableView.OnCanSelectRecord

Example: Changing Selected Records in Bound Mode

Example: Changing Selected Records in Provider and Unbound Modes

Focused/Selected Records

Selecting Records

TcxCustomGridTableController Class

TcxCustomGridTableController Members

cxGridCustomTableView Unit