This is a migrated thread and some comments may be shown as answers.
TreeListView XAML
5 Answers 110 Views
This is a migrated thread and some comments may be shown as answers.
Marc Lefebvre
Top achievements
Rank 1
Marc Lefebvre asked on 18 Feb 2010, 04:51 PM
Can you send a sample XAML for creating a TreeList view with some columns and data items.  I am trying to put together a quick prototype and want to hard code all the data values into the XAML.  I can't find documentation anywhere on how to do this.

Marc

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 23 Feb 2010, 02:20 PM
Hello Marc Lefebvre,

I'm attaching a file with a sample project for TreeListView.  Please visit the below link , here you can find an example of TreeListView.

http://demos.telerik.com/silverlight/#TreeListView/FirstLook

Best wishes,
Dimitrina
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
Max
Top achievements
Rank 1
answered on 16 Mar 2010, 08:35 PM
I am also trying to use the TreeListView control to display hierarchical data from a database, for example:

ParentTable
 -- ChildTable
    -- GrandchildTable

How would I structure my SQL (stored procedure) to pull back the hierarchical relationship for the TreeListView control to use? 

SELECT ParentTable.?, ChildTable.?, GrandchildTable.?
FROM ParentTable
  INNER JOIN ChildTable ON ChildTable.Key = ParentTable.ChildKey
  INNER JOIN GrandChildTable ON GrandChildTable.Key = ChildTable.ChildKey
ORDER BY ParentTable.Name, ChildTable.Name, GrandchildTable.Name

...where the "?" is what columns I'll need to bind the TreeListView control to.  In other words, how do I establish my parent to child to grandchild relationships in the dataset that is returned via my WCF call?  If I decided to instead use a TreeView control, would I be able to use the same SQL?

Is there a link you can point me to for online help related to the TreeListView control?

Thanks!
0
Miroslav
Telerik team
answered on 19 Mar 2010, 02:36 PM
Hello Max Cook,

There is no help available yet specifically for the TreeListView since it is a CTP. There are significant changes expected in the control and I can suggest not using it in production code.

I think that the GridView will be a better match for your scenario since it supports nested tables.

There are examples and help on how to achieve this with the GridView, for example custom hierarchy:

http://demos.telerik.com/silverlight/#GridView/Hierarchy/HierarchyChildTemplate

and populating with a DomainDataSource:

http://demos.telerik.com/silverlight/#GridView/DomainDataSource

Getting data over to the Silverlight application will happen most probably with some kind of web service.

How data will be represented on the client depends on the kind of web service you choose.

I can suggest working with an ORM like EntityFramework or OpenAccess which will abstract the relational database and make it easier to work with data.

Best wishes,
Miroslav
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
Max
Top achievements
Rank 1
answered on 19 Mar 2010, 04:44 PM
I have decided that the best control for my purposes is the RadTreeView.  Most examples that I've found are based on XML datasets, not database resultsets that are returned from a stored procedure.

I am already accessing our database using WCF so that's not the question I have.

My question is how to structure the results from a stored procedure in order to populate a hierarchical RadTreeView control?

Can you point me to any Telerik demos that are accessing data from a database rather than an XML file?  Are there any based on the Northwind database?

Thanks,

Max
0
Tina Stancheva
Telerik team
answered on 24 Mar 2010, 07:18 PM
Hello Max Cook,

Please take a look at this tutorial describing how to populate a RadTreeView with data from a WCF Service and let me know if it helps.

Please let me know if you need more info.

All the best,
Tina Stancheva
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.
Asked by
Marc Lefebvre
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Max
Top achievements
Rank 1
Miroslav
Telerik team
Tina Stancheva
Telerik team
Share this question
or