PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Use conditions
  • Positioning on the last row of the Table or TreeView Table control
  • Equivalence with the TableSelectPlus function
  • Special case: Table control with continous scrollbar
  • "Select a row" event
  • Selection at cell level
  • Table control based on a data file containing more than 10 000 rows
  • Row selector
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Selects a row in a Table or TreeView Table control. The selected row corresponds to the current row on which the selection bar is displayed.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Versions 18 and later
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
New in version 18
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
WEBDEV - Server codePHP This function can now be used to handle TreeView Table controls in WEBDEV and PHP sites.
Versions 19 and later
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
New in version 19
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
WEBDEV - Browser code This function is now available in Browser code for Table controls in browser mode.
Versions 20 and later
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 20
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Android This function is now available for Android applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
// Select row #5 in the "TABLE_ProductTable" control
TableSelectPlus(TABLE_ProductTable, 5)
// Select rows # 5 and 7
// in the multi-selection Table control "TABLE_ProductTable"
TableSelectPlus(TABLE_ProductTable, 5, 7)
Syntax
TableSelectPlus(<Table control> [, <Index 1> [... [, <Index N>]]])
<Table control>: Control name
Name of the control to be used. This control can correspond to:
  • a Table control.
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control to which the current process belongs will be used.
<Index 1>: Optional integer
Index of the first row to select.
If <Index 1> and <Index N> are not specified, all the rows in the control are selected.
TableSelectPlus has no effect if <Index 1> and <Index N> correspond to rows that are already selected. You can get the index of a selected row with TableSelect.
If this parameter corresponds to -1, the "current" row (the one with focus) is selected.
WEBDEV - Server codeWEBDEV - Browser codePHP In "Server" Table controls, only one index can be specified.
<Index N>: Optional integer
Index of the Nth row to select.
If <Index 1> and <Index N> are not specified, all the rows in the specified control are selected.
TableSelectPlus has no effect if <Index 1> and <Index N> correspond to rows that are already selected. You can get the index of a selected row with TableSelect.
WEBDEV - Server codeWEBDEV - Browser codePHP In "Server" Table controls, only one index can be specified.
Remarks

Use conditions

TableSelectPlus can be used on:
  • a Table or TreeView Table control based on a data file.
  • a Table or TreeView Table control populated programmatically.
  • a single-selection or multi-selection control.
    WEBDEV - Server codePHP Reminder: Multi-selection is not available for Table controls in "Server" mode.
WEBDEV - Server codePHP This function is available for Table controls in "Server" and "Server + AJAX" mode, and for TreeView Table controls.
WEBDEV - Browser code This function is available for Table controls in "Browser" mode only.
WEBDEV - Browser codeAndroidiPhone/iPad The TreeView Table control is not available.
WEBDEV - Browser code The TreeView Table control is not available.

Positioning on the last row of the Table or TreeView Table control

To position on the last row of a Table or TreeView Table control, use one of the following syntaxes:
  • TableSelectPlus function:
    TableSelectPlus(<Table control>, <Table control>.Count)
  • Count property:
    <Table control> = <Table control>.Count
  • TableCount function:
    <Table control> = TableCount(<Table control>)

Equivalence with the TableSelectPlus function

For a single-selection Table or TreeView Table control (without stored item), the two following syntaxes are equivalent:
TableSelectPlus(<Table control>, <Index>)

<Table control> = <Index>

Special case: Table control with continous scrollbar

Selecting a non-visible row in the Table control does not give focus to the selected row.
Remark: We recommend that you use a Table control with proportional scrollbar.

"Select a row" event

The "Select a row" event is not run when TableSelectPlus is called.
Versions 16 and later
WINDEVJava

Selection at cell level

The Selected property can be used to select a cell or to determine if a cell is selected in Table controls with "Multiple selection" mode.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2].Selected = True
New in version 16
WINDEVJava

Selection at cell level

The Selected property can be used to select a cell or to determine if a cell is selected in Table controls with "Multiple selection" mode.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2].Selected = True
WINDEVJava

Selection at cell level

The Selected property can be used to select a cell or to determine if a cell is selected in Table controls with "Multiple selection" mode.
For example:
// Example for selecting a cell
TABLE_ListCustomers[3,2].Selected = True

Table control based on a data file containing more than 10 000 rows

In a Table control based on a data file containing more than 10 000 rows, for performance reasons, the positioning in the Table control is approximate.
For an exact positioning, you must:
  1. Perform a search with HReadSeek.
  2. Call TableDisplay with the taCurrentSelection constant.

Row selector

When the style of the Table control contains a row selector, the arrow on the left is positioned on:
  • the last selected row when the multiple selection is performed with the mouse or with the keyboard,
  • the row to which "focus" is gien by assigning the Table control. For example:
    // Positions the row selector on the 3rd row
    // And selects the rows 3, 4 and 5
    TABLE_ListCustomers = 3
    TableSelectPlus(TABLE_ListCustomers, 3, 4, 5)
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment