This is a migrated thread and some comments may be shown as answers.

Hierarchical Data

2 Answers 89 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
David Ocasio asked on 13 Jul 2010, 04:33 PM
Im having problems with Hierarchical data Showing their children. 
I had this working in the prior CTP and am now trying to make it work with the beta
i dumbed up the code to see if i could figure out what was going on but still no child items are displayed.
What am I doing wrong.

Public Class Test
    Private _Items As New ObservableCollection(Of test)
    Public Property Items() As ObservableCollection(Of test)
        Get
            Return _Items
        End Get
        Set(ByVal value As ObservableCollection(Of test))
            _Items = value
        End Set
    End Property
    Private _Name As String = "AA"
    Public Property Name() As String
        Get
            Return _Name
        End Get
        Set(ByVal value As String)
            _Name = value
        End Set
    End Property
End Class
Private Sub tvKits_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles tvKits.Loaded
    Dim zz As New ObservableCollection(Of Test)
    zz.Add(New Test)
    zz(0).Items.Add(New Test)
    zz(0).Items(0).Items.Add(New Test)
    tvKits.ItemsSource = zz
End Sub


<telerikGridView:RadTreeListView IsReadOnly="True" x:Name="tvKits" Grid.Row="1"  Grid.Column="1" AutoGenerateColumns="False" >
    <telerikGridView:RadTreeListView.ChildTableDefinitions>
        <telerikGridView:GridViewTableDefinition>
            <telerikGridView:GridViewTableDefinition.Relation>
                <telerikData:PropertyRelation ParentPropertyName="Items"/>
            </telerikGridView:GridViewTableDefinition.Relation>
        </telerikGridView:GridViewTableDefinition>
    </telerikGridView:RadTreeListView.ChildTableDefinitions>
    <telerikGridView:RadTreeListView.Columns>
        <telerikGridView:GridViewDataColumn Header="Assembly"  DataMemberBinding="{Binding Name}"  />
    </telerikGridView:RadTreeListView.Columns>
      
</telerikGridView:RadTreeListView>

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 15 Jul 2010, 03:34 PM
Hello David Ocasio,

Please find attached a working project based on the code you provided.

Best wishes,
Veskoni
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 15 Jul 2010, 04:12 PM

Oh I see

I used
GridViewTableDefinition

instead of
TreeListViewTableDefinition

thanks Veskoni

Tags
TreeListView
Asked by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Veselin Vasilev
Telerik team
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or