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 / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Columna de tabla
  • Overview
  • How to create a Container column?
  • Steps to follow
  • Main control of a Container column
  • Limitations
  • Using a Container column
  • Table control based on a data file or Table control based on a variable
  • Table control populated programmatically
  • Manipulating the controls found in the Container column
  • Limitation: Type of fields not available
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
Overview
A table cell can contain a set of controls. Several types of controls can be include in a Container column:
  • Static Text control,
  • edit control,
  • Image control,
  • Button control,
  • WINDEV Chart control,
  • WINDEV Table control,
  • WINDEV Internal Window control,
  • etc.
A main control can be defined for the cell. This control will be the one used:
  • for the additions performed programmatically,
  • for the sorts,
  • for the link with the data (link with an item or with a variable), ...
WINDEV Via the internal windows, all the controls of the container column can have a different content for each row of the Table control.
WINDEVWEBDEV - Código Servidor Container columns are also available for TreeView Table control fields.
How to create a Container column?

Steps to follow

To create a Container column in a Table control:
  1. If necessary, create a Table control (based on a data file, populated programmatically or based on a variable).
  2. Create a Container column (via the context menu of the Table control or from the description window of the Table control).
  3. Increase (if necessary) the height of the rows found in the Table control with the mouse.
  4. Position the requested controls in the Container cell of the first row found in the Table control. It is possible to:
    • move the existing controls in the window to the Container column.
    • drag and drop the items from the analysis displayed in the "Project explorer" pane.
  5. In the description of the Container column, specify (if necessary) the main control of the column ("General" tab) and validate.

Main control of a Container column

The main control of the Container column corresponds to the control handled by default in the column. For example:
  • The sort of the Container column will be performed on the main control.
  • The searches performed in a Container column will be performed on the main control.
  • Programming additions or modifications: the value of the column indicated in function <Table>.AddLine, for example, will be assigned to the main field.
  • Exports made from the Table field (exports to Excel, Open Office, Word, etc.) will take into account the value of the column's main field.
  • If the Container column is linked to a data file or to a variable, the control actually linked will be the main control.
The definition of a main control in a Container column is optional.

Limitations

  • WINDEV In Container columns, a string must be assigned to Check Box controls using the following format: "<True/False>;<True/False>;<True/False>...".
    Similarly, the value returned by these Check Box controls is a string in the following format: "<True/False>;<True/False>;<True/False>...".
  • The captions of the options found in the Radio Button and Check Box controls cannot be customized for each row in a Container column.
  • WINDEV To use a control with a different value for each row found in a Container column, all you have to do is include this control in an internal window and insert an Internal Window control into the column. This tip can be used, for example, for Picker, Check Box control, etc. fields.
WINDEV Remarks: Internal window, Chart control and Table control in a Container column:
  • Uncheck "Contenido idéntico para todas las filas" ("UI" tab of the control description window) to get a different display on each row.
  • Internal window fields, Chart control fields and Table control fields must be populated programmatically.
Using a Container column

Table control based on a data file or Table control based on a variable

A Table control based on a data file can contain one or more Container columns. The controls found in this Container column can display the records of the data file for example.
In this case, the Table control is linked to the data file.
Each control found in the Container column is linked to the corresponding item.
If a main control is defined on the Table control, we advise you to:
  • solution 1: keep the main field bound to the data file item. The Container column is linked to no item.
  • solution 2: link the Container column to the field associated with the main field and remove the link at field level.

Table control populated programmatically

A Table control populated programmatically can contain one or more Container columns. The main control of the Container column will be manipulated programmatically by the Table control functions
For example, when a row is added by <Table>.AddLine, only the main control of the column will be assigned with the value defined by the column. If several controls must be initialized in the column, you must use the syntax described in the next paragraph. For example:
NumLigne is int 
NumLigne = TABLE_Table2.AjouteLigne("Moulain")
COL_Colonne1[NumLigne].SAI_Prenom = "Florence"

Manipulating the controls found in the Container column

The controls found in a Container column can be handled via the following syntax:
<Nom de la colonne>[<Numéro de Ligne>].<Nom du champ>
For example:
  • Assigning a value to a control:
    COL_Colonne1[NumLigne].SAI_Prenom = "Florence"
  • Assigning elements to a Combo Box control of a container:
    COL_Colonne1[NumLigne].COMBO_Combo1.Contenu = "Elément 1" + CR + "Elément 2"
  • Modifying a control property:
    COL_Colonne1[NumLigne].PrixHT.Couleur = LightRed
  • Indirection on a control in a Container column:
    sNomChampDansColoneConteneur is string
    sNomChampDansColoneConteneur = "TABLE_AvecColConteneur.COL_Conteneur[" + ...
    		nIndiceLigne + "].SAI_DansColConteneur"
    //ou
    //sNomChampDansColoneConteneur = "TABLE_AvecColConteneur[" + ...
    // 	nIndiceLigne + "].COL_Conteneur.SAI_DansColConteneur"
    
    Info({sNomChampDansColoneConteneur})
  • WINDEV Adding a row into a Table control found in a Container column:
    TABLE_AVEC_TABLE_INTEGREE[NumLigne].TABLE_Dans_Conteneur.AjouteLigne("Contenu_Col1", "Contenu_Col2")
  • WINDEV Handling a Check Box control inserted into an internal window:
    TABLE_SansNom1[NumLigne].FI_SansNom1.INT_Interrupteur[Indice] = True
  • WINDEV Change the internal window in an Internal Window control of a Container column:
    // Charge la fenêtre interne FI_FenêtreInterne1, à la ligne NumLigne d'un champ Fenêtre interne
    // nommé CFI_ChampFenêtreInterne contenu dans une colonne de type conteneur d'un champ Table
    // Attention: le champ CFI_ChampFenêtreInterne doit avoir 
    // l'option "contenu identique pour toutes les lignes" non cochée 
    // (onglet "UI" de la fenêtre de description)
    ChangeSourceWindow(TABLE_SansNom1[NumLigne].CFI_ChampFenêtreInterne, FI_FenêtreInterne1)
Remark: For a Table based on a data file field, it is advisable to manipulate the fields of a Container column in the "Display a line" event.
Limitation: Type of fields not available
WINDEV In a Container column, all the controls can be used, either directly, or via an internal window.
WEBDEV - Código Servidor In a Container column, only the following types of controls can be used:
  • Rich Text Area control,
  • Simple Static Text control,
  • Formatted display control,
  • Link control,
  • Button control,
  • Image control,
  • Edit control,
  • Combo Box control,
  • Radio Button control,
  • Check Box control,
  • List Box control,
  • Calendar control,
  • Rating control,
  • Slider control,
  • Bar Code control (not available in browser Table controls),
  • Social Link control (not available in AJAX or Browser Table controls).
  • Android The following fields are not supported in a Container column:
    • Looper control,
    • Dashboard control,
    • Chart control,
    • Scheduler control,
    • Organizer control,
    • Camera control,
    • PDF Reader control,
    • Map control.
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

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