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
55
Weird behaviour with creating nodes from DataSource
posted

Im using Infragistics 16.2 and have a problem with the UltraTree that i simply dont understand.

The tree doesn't generate all nodes if the DataSource is some recoursive list that has more levels in items that follow the first item.

(First item has e.g 2 levels, following item has >2 levels)

Am i missing something? 

Please see my sample for further information:

https://imgur.com/a/UWDtw

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Dim list1 As New List(Of MyItem)
Dim list2 As New List(Of MyItem)

list1.Add(New MyItem With {.Name = "1"})
list1.Add(New MyItem With {.Name = "2"})
list1(0).Childs.Add(New MyItem With {.Name = "1.1"})
list1(0).Childs.Add(New MyItem With {.Name = "1.2"})
list1(0).Childs(0).Childs.Add(New MyItem With {.Name = "1.1.1"})
list1(0).Childs(0).Childs.Add(New MyItem With {.Name = "1.1.2"})

UltraTree1.DataSource = list1

list2.Add(New MyItem With {.Name = "1"})
list2.Add(New MyItem With {.Name = "2"})
list2(1).Childs.Add(New MyItem With {.Name = "2.1"})
list2(1).Childs.Add(New MyItem With {.Name = "2.2"})
list2(1).Childs(0).Childs.Add(New MyItem With {.Name = "2.1.1"})
list2(1).Childs(0).Childs.Add(New MyItem With {.Name = "2.1.2"})

UltraTree2.DataSource = list2

End Sub

End Class


Public Class MyItem
Public Property Name As String
Public Property Childs As New List(Of MyItem)
End Class