ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / How to proceed? / Programming
  • Method 1: Populating the control using the position of the parent row
  • Method 2: Populating the control using the path of the parent element
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
A TreeView Table control is a Table control whose one of the columns is a treeview. A TreeView Table control is filled by TableAddChild.
Several fill methods are available:
Method 1: Populating the control using the position of the parent row
This method is based on the position of parent row. Each child element is added in relation to the row number of its parent. The syntax of TableAddChild is as follows:
TableAddChild(<TreeView Table name>, <Parent row number>, <Child element>)
For example:
TableAddChild(TVT_MyTable, 0, "France")
TableAddChild(TVT_MyTable, 0, "Italy")
TableAddChild(TVT_MyTable, 1, "Hérault")
TableAddChild(TVT_MyTable, 1, "Gard")
TableAddChild(TVT_MyTable, 4, "Tuscany")
TableAddChild(TVT_MyTable, 4, "Venetia")
TableAddChild(TVT_MyTable, 2, "Montpellier")
TableAddChild(TVT_MyTable, 2, "Sète")
TableAddChild(TVT_MyTable, 5, "Nimes")
TableAddChild(TVT_MyTable, 2, "Agde")
TableAddChild(TVT_MyTable, 9, "Florence")
TableAddChild(TVT_MyTable, 9, "Siena")
TableAddChild(TVT_MyTable, 12, "Venice")
TableAddChild(TVT_MyTable, 8, "Lombardy")
TableAddChild(TVT_MyTable, 14, "Milan")
Method 2: Populating the control using the path of the parent element
This method is based on the path of parent row. Each child element is added in relation to the path of its parent. The syntax of TableAddChild is as follows:
TableAddChild(<TreeView Table name>, <Parent element path>, <Child element>)
For example:
TableAddChild(TVT_MyTable, "", "France")
TableAddChild(TVT_MyTable, "", "Italy")
TableAddChild(TVT_MyTable, "France", "Hérault")
TableAddChild(TVT_MyTable, "France", "Gard")
TableAddChild(TVT_MyTable, "Italy", "Tuscany")
TableAddChild(TVT_MyTable, "Italy", "Venetia")
TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Montpellier")
TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Sète")
TableAddChild(TVT_MyTable, "France" + TAB + "Gard", "Nimes")
TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Agde")
TableAddChild(TVT_MyTable, "Italy" + TAB + "Tuscany", "Florence")
TableAddChild(TVT_MyTable, "Italy" + TAB + "Tuscany", "Siena")
TableAddChild(TVT_MyTable, "Italy" + TAB + "Venetia", "Venice")
TableAddChild(TVT_MyTable, "Italy", "Lombardy")
TableAddChild(TVT_MyTable, "Italy" + TAB + "Lombardy", "Milan")
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/02/2024

Send a report | Local help