Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Relations with treeview
posted

Datamodel

Hi folks,

 i have written a typed dataset including 4 tables, which have 3 relations, one between each table.  I am using it as datasource for UltraWebTree.

I works fine except one feature. As you can see curently 4th Levels are used. I want to reduce the 3rd Level, cause thier is no meaningfull benefit.

So how can configure the Webtree that i can set the relation on the second Level directly linking  to data of my 4th table. Which includes the End Link.

Attached you find the existing way. 

 

        Dim ds2 As New WGRTree

        WGRAdapter.FillParents(ds2.Tables("WGR"))
        WGR1Adapter.Fill(ds2.Tables("WGR1"))
        WGRLiefAdapter.Fill(ds2.Tables("LiefWGR"))
        LiefAdapter.FillTreeLief(ds2.Tables("FIRMEN"))

        ultraTreeWGR.DataSource = ds2

        ultraTreeWGR.Levels(0).LevelKeyField = "ID"
        ultraTreeWGR.Levels(0).ColumnName = "HierarchyName"
        ultraTreeWGR.Levels(0).RelationName = "WGR_WGR1"

        ultraTreeWGR.Levels(1).LevelKeyField = "ID"
        ultraTreeWGR.Levels(1).ColumnName = "HierarchyName"
        ultraTreeWGR.Levels(1).RelationName = "WGR1_LiefWGR"


        ultraTreeWGR.Levels(2).ColumnName = "ID"
        ultraTreeWGR.Levels(2).RelationName = "WGR_FIRMEN"

        ultraTreeWGR.Levels(3).LevelKeyField = "MZE_Zrnr"
        ultraTreeWGR.Levels(3).ColumnName = "FirmaOut"
        ultraTreeWGR.Levels(3).TargetUrlName = "MZE_Zrnr"

        ultraTreeWGR.DataMember() = "WGR"
        ultraTreeWGR.DataBind()