B4J Tutorial [BANanoWebix] Lesson 14 - The TreeTable

Discussion in 'B4J Tutorials' started by Mashiane, Jun 30, 2019.

  1. Mashiane

    Mashiane Expert Licensed User


    The tree-table is a combination of the tree and the data-table.


    To create the tree-table, one needs to add the columns they will need, then indicate which column should feature the tree structure and then add data to it.

    To create columns we use the WixDataColumn class we saw for the datatable. Let's create a tree-table with 3 columns and the 'Candy Bars' column the 'treeview' section.

    Dim prop As WixTreeTable
        Dim c1 As WixDataColumn
        Dim c2 As WixDataColumn
    "value").Setheader("Candy Bars").SetTemplate("{common.treetable()} #value#").Setwidth(300).Setsort("string").Pop1
        Dim c3 As WixDataColumn
    We set the selection model for it being the complete row and then add the columns setting their widths.

    We then add flat data to it that we later unflatten to form the tree we need.

    prop.AddItem("""1""Hershey", CreateMap(), True)
    "1""1.1""Almond Joy", CreateMap("nutsOrNot" : "Has Nuts"),False)
    "1""1.2""Hershey's Kisses", CreateMap("nutsOrNot" : "No Nuts"), True)
    "1.2""1.2.1""Milk Chocolate With Almonds", CreateMap("nutsOrNot" : "Oh Yeah, Except These"), False)
        Dim data As List = pg.Unflatten(prop.Items, "data")
    joulongleu likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice