ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Table Column control
  • Overview
  • Characteristics of the columns of a Table control in a page
  • Sortable column (AJAX mode only)
  • Search column (magnifying glass): (Ajax mode only)
  • Adjustable column (AJAX mode only)
  • Calculated columns and Check Box columns in Table controls with in-memory data source
  • Specific features of the Table control columns in a page
  • Columns of type "List of values"
  • Actions in the columns of a Table control
  • Link column (Table control displayed in a page)
  • Creating the Link columns
  • Action
  • Target
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
The columns are used to display information in a Table control. The same type of information is displayed in the same column.
The following types of data can be displayed in a column found in a Table control:
  • Text
  • Currency
  • Time
  • Currency + Euro
  • Check Box (AJAX Tables only)
  • Numeric/High-precision numeric
  • Date
  • List of values (in AJAX, the list of values are combo boxes)
  • Duration
  • Image (AJAX Tables only)
  • Container
Specific characteristics can be configured for each type of column.
The programming of each type of column corresponds to the programming of the corresponding control.
The following paragraphs present the main characteristics of the columns in a Table control, available in a page regardless of the column type. Some options are available for AJAX tables only.
For more details, see Table columns in a window.
Characteristics of the columns of a Table control in a page
Most characteristics of the columns found in a Table control are configured in the "General" tab of the characteristics of each column.

Sortable column (AJAX mode only)

The user will be able to sort the column via a click performed on its header. This option is available:
  • for all the columns in a Table control populated programmatically.
  • for some columns in the Table control based on a data file (only columns based on key items and without filter).
and allow you to know the sort direction of the column at any time.
Programming: Sorting can also be programmed using the:
TableSortAllows you to sort a Table control on one or more columns

Search column (magnifying glass): (Ajax mode only)

The user will be able to perform a search in the column of the Table control.
Two methods are available:
  • The user types the sought word directly. This search is automatically performed in the sorted column.
  • Clicking a column header with a search icon opens an edit control. The user will only have to type the sought word.
The search is available:
  • for all the columns in a Table control populated programmatically.
  • for the columns of Table controls based on a data file with automatic iteration (only sortable columns based on key items, and without filter).
Attention: Search is not available:
  • for items associated with a multi-file link.
  • for the Table controls that use a non-proportional scrollbar ("Proportional scrollbar" unchecked in the "Details" tab of the control description window).
You can customize the search icon. For more details, see Configuring columns of Table controls.
Programming: The search can be programmed using the:
TableSearchSearches for a value in a column of a Table or TreeView Table control based on a data file or populated programmatically.
TableSearchChildSearches for a value in a column of a TreeView Table control, in a specified branch.

Adjustable column (AJAX mode only)

Columns can be resized: users can manipulate the size of columns.
Programming: Column sizes can be adjusted using the TableAdjust function.

Calculated columns and Check Box columns in Table controls with in-memory data source

In a Table based on a data file field, it is possible to create calculated columns: these columns are not linked to a data file.. These columns can display a calculation, for example, ...
"Check Box" columns in a Table control with in-memory data source are specific calculated columns. When scrolling through the control, checked boxes keep their selected state.
Specific features of the Table control columns in a page
WEBDEV - Server codeWindows

Columns of type "List of values"

If a Table control contains a "List of values" column:
  • the content of this list is entered in the column description. The content of this list cannot be modified programmatically.
  • in the code, you just need to specify the index of the element in the list to be handled.
Example: The Day column is of type List of values. This column contains the following values:
To add the "Afternoon" value to the Day column, use index 3:
TableAddLine(TABLE_TableAPT, "John Smith", "London", 3)
WEBDEV - Server codeWindows

Actions in the columns of a Table control

For all the Table control columns, you can define a specific action that will be performed when the user clicks an element in the column. This action is defined in the "Details" tab of the column description window ("Other actions").
You can:
  • Perform a preset action.
  • Set the position on one of the page anchors.
  • Perform an action from a custom link.
For the link columns (with "Submit the value of controls to the server" unchecked), you can also:
  • Display a page of another site.
  • Download, open, display a file.
  • Connect to a file server.
  • Send an email.
Link column (Table control displayed in a page)
WEBDEV - Server codeWindows

Creating the Link columns

The Link columns are used to define a Hypertext link when clicking a column. Like for any other link, WEBDEV allows you to define the action and the target associated with the link.
To create a Link column, you must:
  1. Select the column in the Table control.
  2. Select "Link column " in the "Details" tab of the column description window.
  3. Specify the action and the target to use ("Details" tab of the column description window). For more details, see the following paragraphs.
WEBDEV - Server codeWindows

Action

Different preset actions are available in a drop-down list. These predefined actions depend on the elements present on the page and on the project pages.. You can for example choose to display a project page, to run the click code of a button or to point to one of the page anchors.
Caution: Actions are performed after the Table field click code.
If no preset action corresponds to the desired action, the "Other actions" button enables you to define a specific action. You can:
  • Perform a preset action.
  • Set the position on one of the page anchors.
  • Perform an action from a custom link.
For the link columns (with "Submit the value of controls to the server" unchecked), you can also:
  • Display a page of another site.
  • Download, open, display a file.
  • Connect to a file server.
  • Send an email.
WEBDEV - Server codeWindows

Target

If no destination is chosen for the action, it is performed in the default destination defined for the current page.
The possible targets of an action are:
New browser (_blank):
Displays the result in a new browser window.
Current frame (_self):
Displays the result in the same frame.
Parent frame (_parent):
Displays the result in the parent frame (case of nested framesets).
Current browser (_top):
Displays the result in the current page of the browser (without frames).
Other frames in the frameset (if the page is part of a frameset):
Displays the result in a specific frame.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 10/04/2024

Send a report | Local help