AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades de ventanas, páginas y controles
  • Value property
  • DataBinding property
  • Table control populated programmatically
  • List Box control populated programmatically
  • Search and select an item in a List Box control (or Combo Box control) linked to a data file
  • Limitations
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
The StoredItem property is used to:
  • Find out the stored item or variable of a Table, RepeatString, Tree, List or Combo field.
  • Modify the stored item or variable of a Table, RepeatString, Tree, List or Combo field.
Remarks:
  • The stored item is used for controls associated with a data file or query. The stored variable is used for controls associated with a variable.
  • The stored item or variable is defined in the window or page editor, in the "Content" tab of the control description.
    StoredItem
Ejemplo
// Modify the stored item of the "TABLE_CustomerTable" control
TABLE_CustomerTable.StoredItem = "CustomerName"
Sintaxis

Getting the stored item or variable of a control Ocultar los detalles

<Stored item/variable> = <Control used>.StoredItem
<Stored item/variable>: Character string
  • Name of the stored item for the specified control. This item belongs to the data file the control is based on (returned or modified with the BrowsedFile property).
  • Name of the stored variable for the specified control. This name has the following format ":<prefix><Variable name>" or ":<Variable name>" (the prefix is used 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).
  • Empty string ("") if no item or variable is associated with the control.
<Control used>: Control name
Name of control to use:
  • Table control,
  • List Box control,
  • Combo Box control,
  • TreeView control.

Changing the stored item or variable of a control Ocultar los detalles

<Control used>.StoredItem = <New item/variable>
<Control used>: Control name
Name of control to use:
  • Table control,
  • List Box control,
  • Combo Box control,
  • TreeView control.
<New item/variable>: Character string
  • Name of the new stored item for the specified control. This item must belong to the data file the control is based on (returned or modified with the BrowsedFile property).
  • Name of the new stored variable for 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).
  • Empty string ("") if no item or variable must be associated with the control.
Observaciones

Value property

The StoredItem property modifies the value returned by the Value property.
Two distinct cases may occur:
  • The List Box or Table control is manipulated programmatically OR the StoredItem property is set to an empty string (""). The Value property allows you to:
    • Get the selected row. If no row is selected, the Value property returns -1. If you use a multiple-selection List Box or Table control, the number of the last selected row is returned.
    • Select another row by specifying the number of the new row to select. The rows previously selected are deselected.
      To find out the selected row, use one of the following syntaxes:
      ResRow = <List Box or Table control>.Value
      ResRow = <List Box or Table control>
  • The List Box or Table control is based on a data file AND the StoredItem property is not an empty string (""). The Value property is used to identify the stored item for the record associated with the selected row. If no row is selected, the Value property returns an empty string ("").
    To find out the stored item associated with the selected row, the following syntaxes are equivalent:
    ResStoredItem = <List Box or Table control>.Value
    ResStoredItem = <List Box or Table control>.StoredItem

DataBinding property

The StoredItem property is often used in combination with the DataBinding property . This association creates an automatic link between two data files when FileToScreen and ScreenToFile are called.

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 or in the page editor.
  • In the code, specify the item to loop through with the BrowsedItem property. This item must be in the data file, query or view whose data will be displayed in the Table control populated programmatically.
  • In the code, specify the item to be stored with the StoredItem property. 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.

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 populated programmatically in the window editor or in the page editor.
  • Use FileToMemoryList to initialize the control with the desired data.
  • The BrowsedFile, DisplayedItem, BrowsedItem and StoredItem properties will be automatically initialized.

Search and select an item in a List Box control (or Combo Box control) linked to a data file

To find and/or select an item in a List Box control (or Combo Box control) linked to a data file, use the following syntax:
LIST_OrderList.StoredItem = "CustomerID"
// Find and select the element whose CustomerID is "135"
LIST_OrderList = 135
// If the element sought is not found, LIST_OrderList will be set to -1

Limitations

The StoredItem property can only be used in the following controls:
  • Table control,
  • List Box control,
  • Combo Box control,
  • WINDEVJava ListView control,
  • WEBDEV - Código Servidor Looper control.
  • TreeView control.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 08/01/2025

Señalar un error o enviar una sugerencia | Ayuda local