Returns the number of selected elements in a Table or TreeView Table control (especially for a multiselection control).

The number of selected elements can correspond to:

the number of selected rows (current rows onto which the selection bar is displayed).

Versions 16 and laterthe number of selected cells if the controls allows the selection mode by cell. This option can be configured in the "GUI" tab of control description.

New in version 16the number of selected cells if the controls allows the selection mode by cell. This option can be configured in the "GUI" tab of control description.

the number of selected cells if the controls allows the selection mode by cell. This option can be configured in the "GUI" tab of control description.

Versions 16 and laterthe number of selected columns if the control allows the selection mode by column. This option can be configured in the "GUI" tab of control description.

New in version 16the number of selected columns if the control allows the selection mode by column. This option can be configured in the "GUI" tab of control description.

the number of selected columns if the control allows the selection mode by column. This option can be configured in the "GUI" tab of control description.

Versions 16 and later

This function is now available for WINDEV applications in Linux.

New in version 16

This function is now available for WINDEV applications in Linux.

This function is now available for WINDEV applications in Linux.

Versions 18 and later

This function can now be used to handle the TreeView Table control in the WEBDEV and PHP sites.

New in version 18

This function can now be used to handle the TreeView Table control in the WEBDEV and PHP sites.

This function can now be used to handle the TreeView Table control in the WEBDEV and PHP sites.

Versions 19 and later

This function is now available in Browser code.

New in version 19

This function is now available in Browser code.

This function is now available in Browser code.

Versions 20 and later

This function is now available for Android applications.

This function is now available for iPhone/iPad applications.

New in version 20

This function is now available for Android applications.

This function is now available for iPhone/iPad applications.

This function is now available for Android applications.

This function is now available for iPhone/iPad applications.

Example

// Traces the content of selected rows// (The Table control is a multiselection Table control)i is intNbSelected is intNbSelected = TableSelectCount(TABLE_Product) FOR i = 1 TO NbSelectedTrace("Selected row: " + ...TABLE_Product[TableSelect(TABLE_Product, i)]) END

// Deletes all selected rows from a Table control// (The Table control is a multiselection Table control)// TableDeleteSelect is available from version 18i is intNbSelection is int = TableSelectCount(TABLE_MyTable)FOR i = NbSelection TO 1 STEP -1TableDelete(TABLE_MyTable, TableSelect(TABLE_MyTable, i))END