|
|
|
|
|
- Método 1: Rellenar el control utilizando la posición de la fila padre
- Método 2: Rellenar el control utilizando la ruta del elemento padre
¿Cómo rellenar un control Tabla TreeView?
Un control Tabla TreeView es un control Tabla cuya una de las columnas es un treeview. Un control Tabla TreeView se rellena con TableAddChild. Existen varios métodos de relleno: Método 1: Rellenar el control utilizando la posición de la fila padre Este método se basa en la posición de la fila padre. Cada elemento hijo se añade en relación con el número de fila de su padre. La sintaxis de TableAddChild es la siguiente: TableAddChild(<TreeView Table name>, <Parent row number>, <Child element>) Por ejemplo: 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")
Método 2: Rellenar el control utilizando la ruta del elemento padre Este método se basa en la ruta de la fila padre. Cada elemento hijo se añade en relación con la ruta de su padre. La sintaxis de TableAddChild es la siguiente: TableAddChild(<TreeView Table name>, <Parent element path>, <Child element>) Por ejemplo: 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")
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|