Skip to main content

TcxCustomDataController.GetSelectedCount Method

Returns the number of selected rows.

Declaration

function GetSelectedCount: Integer;

Returns

Type
Integer

Remarks

This function returns the number of selected rows (data records and grouping rows) in the current data controller.

When the selection of multiple rows is disabled (the MultiSelect property is set to False), there can be only one selected row (equivalent to the focused row). In this mode, GetSelectedCount returns 1. However, you can call the SyncSelected method to unselect the focused row. In this case, GetSelectedCount returns 0.

GetSelectedCount can be used in all data loading modes (unbound, provider, bound, and grid modes). To access selected rows, you need to use the GetSelectedRowIndex method (in unbound/provider and default bound modes) or the GetSelectedBookmark function (in grid mode).

See Also