4 Answers, 1 is accepted
0
XamlFish
Top achievements
Rank 1
answered on 05 Jun 2013, 10:25 PM
Hi there,
This is a pretty old post and has no response. But the Getting Started example for the RadTreeListView STILL doesn't work. I just copied it into a VS 2012 with the latest RadControls and it completely fails silently. No errors, no data, as my fellow poster says. Now, I'm new to binding and Silverlight, but I do know how to type....Can someone please help? Is the problem that there is no instance of the source or DataContext?
Also, this isn't the only time that I've run into problems like this with Telerik documentation. If you guys are looking for help along those lines, I'm available for hire! :-)
Best,
Betty
Issue: RadTreeListView Getting Started Example Doesn't work - http://www.telerik.com/help/silverlight/radtreeliestview-getting-started.html
This is a pretty old post and has no response. But the Getting Started example for the RadTreeListView STILL doesn't work. I just copied it into a VS 2012 with the latest RadControls and it completely fails silently. No errors, no data, as my fellow poster says. Now, I'm new to binding and Silverlight, but I do know how to type....Can someone please help? Is the problem that there is no instance of the source or DataContext?
Also, this isn't the only time that I've run into problems like this with Telerik documentation. If you guys are looking for help along those lines, I'm available for hire! :-)
Best,
Betty
Issue: RadTreeListView Getting Started Example Doesn't work - http://www.telerik.com/help/silverlight/radtreeliestview-getting-started.html
0
Hello Betty,
Yoan
Telerik
I have prepared a sample project based on the mentioned help article and everything works as expected. Please find it attached.
Yoan
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
XamlFish
Top achievements
Rank 1
answered on 06 Jun 2013, 09:37 PM
Thanks for the quick response back! Once piece I was missing was the ItemSource statement in the Mainpage.cs. However, the Items collection isn't displaying and I can't figure out what's missing. Can you help? See the attached picture.
Thanks.
Thanks.
0
Hello Betty,
Regards,
Yoan
Telerik
By default the RadTreeListView will auto-generate the columns for your data, by creating a column for each property. In order to prevent this you have to set the AutogenerateColumns property to False and to manually add the desired columns to the Columns collection of the control. Please check the following code snippet for a reference:
<
telerik:RadTreeListView
x:Name
=
"radTreeListView"
AutoGenerateColumns
=
"False"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Items}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"Name"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Count}"
Header
=
"Count"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
Please give it a try and let me know how it goes.
Regards,
Yoan
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.