ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Manipulate File Table, File RepeatString, File List (including Image List) and File Combo fields using the File Table, File RepeatString, File List (including Image List) and File Combo properties
  • Modifying the item displayed in Table controls populated programmatically, based on a data file and based on a variable
  • Table control populated programmatically
  • List Box control populated programmatically
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The DisplayedItem property is used to:
  • Find out the item or the variable displayed by the control.
  • Modify the item or the variable displayed by the control.
Remarks:
  • In the report "Opening" event, this property is used to modify the item displayed in a control when the data source of the report is modified through programming (by SourceName for example).
  • If this property is used in the control "Before printing" event, the change will be performed the next time the control is printed (indeed, the item value is already read when running the control "Before printing" event).
  • The displayed item can come from a data file, a view or a query.
  • The stored item or variable is defined in the window or page editor, in the "Content" tab of the control description.
Example
WEBDEV - Server codeAjax
// -- Ouverture de l'état
// Changement du fichier de données parcouru
ETAT_Etat1.NomSource = Client 
// Nouvelle rubrique affichée dans le champ "NomCli"
NomCli.RubriqueAffichée = "NomClient"
WEBDEV - Server codeAjax
// Change the data file associated with the report
// Switch from Customer data file to Prospect data file
RPT_CustomerReport.SourceName = Prospect
// Change the view associated with the report. 
// This view is based on the Prospect data file
RPT_CustomerReport.ViewName = MyCustomerView84
CustomerName.DisplayedItem = "ProspectName"
WEBDEV - Server codeAjax
// Modifier les rubriques affichées dans le champ Table "TABLE_TableClient"
TABLE_TableClient.RubriqueAffichée = "PrénomClient|NomClient|CP|Ville"

// Modifier la rubrique affichée dans le champ Liste "LISTE_ListeClient"
LISTE_ListeClient.RubriqueAffichée = "PrénomClient"
Syntax
WEBDEV - Server codeAjax

Finding out the item/variable displayed by a Table, List Box or Combo Box control Hide the details

<Item/variable currently displayed> = <Control used>.DisplayedItem
<Item/variable currently displayed>: Character string
  • Name of item displayed by the specified control. This item belongs to the data file the control is based on (returned or modified with the BrowsedFile property).
  • Name of variable displayed by the specified control. This name has the following format:
    ":<prefix><Variable name>"
    or
    ":<Variable name>"
    (the prefix is applied only if the code style is enabled in the project).
    This variable belongs to the variable the control is based on (returned or modified with the BrowsedFile property).
  • For a Table control, list of the names of items or variables displayed by each column. The names of items/variables are separated by the "|" character (AltGr + 6 keys).
<Control used>: Control name
Name of field to be manipulated: Table, List, Image list or Combo.
WEBDEV - Server codeAjax

Modifying the item/variable displayed by a Table, List Box or Combo Box control Hide the details

<Control used>.DisplayedItem = <New item/variable>
<Control used>: Control name
Name of field to be manipulated: Table, List, Image list or Combo.
<New item/variable>: Character string
  • Name of item that will be displayed in the specified control. This item belongs to the data file the control is based on (returned or modified with the BrowsedFile property).
  • Name of variable that will be displayed in the specified control. This name has the following format:
    ":<prefix><Variable name>"
    or
    ":<Variable name>"
    The prefix must be specified only if the code style is enabled in the project (whether or not prefixes are displayed).
    This variable belongs to the variable the control is based on (returned or modified with the BrowsedFile property).
  • For a Table control, list of the names of items or variables displayed by each column. The names of items/variables are separated by the "|" character (AltGr + 6 keys).
WEBDEV - Server codeAjax

Finding out the item displayed by a report control Hide the details

<Item currently displayed> = <Control used>.DisplayedItem
<Item currently displayed>: Character string
Name of item associated with the specified control. For a multi-file link, the field name is of the type:
<Data File Name 1>.<Field Name> + TAB + <Data File Name 2>.<Field Name>
This item corresponds to:
  • a heading belonging to the report source data file (known or modified using the SourceName property).
  • an item (or its alias) belonging to the query used as data source of report.
<Control used>: Control name
Name of report control to use.
In a report, this control can be:
  • an Image control,
  • a Bar Code control,
  • an RTF Static Text control,
  • a Static Text control,
  • a Check Box control,
  • a Calculated control.
  • a Spreadsheet control
WEBDEV - Server codeAjax

Modifying the item displayed by a report control Hide the details

<Control used>.DisplayedItem = <New item>
<Control used>: Control name
Name of report control to use.
In a report, this control can be:
  • an Image control,
  • a Bar Code control,
  • an RTF Static Text control,
  • a Static Text control,
  • a Check Box control,
  • a Calculated control.
  • a Spreadsheet control
<New item>: Character string
Name of new item associated with the specified control. For a multi-file link, the field name is of the type:
<Name File1>.<Item name> + TAB + <Name File2>.<Item name>
This item corresponds to:
  • a heading belonging to the report source data file (known or modified using the SourceName property).
  • an item (or its alias) belonging to the query used as data source of report.
Remarks
WEBDEV - Server codeAjax

Manipulate File Table, File RepeatString, File List (including Image List) and File Combo fields using the File Table, File RepeatString, File List (including Image List) and File Combo properties

  • The records displayed in a List Box, Table, Looper or Combo Box control based on a data file come from the data file or query specified with the BrowsedFile property.
  • The sort direction is defined by the BrowsedItem property.
  • The records can be filtered using the Filter property or the HFilter function.
WEBDEV - Server codeAjax

Modifying the item displayed in Table controls populated programmatically, based on a data file and based on a variable

If <New item/variable> contains:
  • A number of items greater than the number of columns in the Table control, only the first items (or variables) are associated with the columns in the Table control.
  • A number of items lower than the number of columns in the Table control, the "additional" columns will not be associated with any item (or variable).
Note To associate a column with a field or variable, use the DataBinding property.
WEBDEV - Server codeAjax

Table control populated programmatically

If a Table control populated programmatically must display data coming from a data file, a query or a view:
  • Create a Table control populated programmatically in the window editor.
  • In your program, specify the item that will be browsed by BrowsedItem. This item must be in the data file, query or view whose data will be displayed in the Table control populated programmatically.
  • Use FileToMemoryTable to initialize the Table control with the desired data. The data will be sorted according to the specified search item.
  • The DisplayedItem property will be automatically initialized.
WEBDEV - Server codeAjax

List Box control populated programmatically

If a List Box or Combo Box control populated programmatically must display data from a data file, query or view:
  • Create a List Box or Combo Box control in the window editor.
  • Use FileToMemoryList to populate the List Box or Combo Box control with the desired data.
  • The BrowsedFile, DisplayedItem, BrowsedItem and StoredItem properties will be automatically initialized.

Limitations

WEBDEV - Server code In a page, the DisplayedItem property applies only to the following controls:
  • Table control,
  • Looper control,
  • List Box control,
  • Combo Box control.
WEBDEV - Server code In a report, the DisplayedItem property applies only to the following controls:
  • Image control.
  • Bar Code control.
  • RTF Static Text control.
  • Static Text control.
  • Check Box control.
  • calculated control.
  • Spreadsheet control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/08/2025

Send a report | Local help