TreeListView XAML

6 posts, 0 answers
  1. Marc Lefebvre
    Marc Lefebvre avatar
    1 posts
    Member since:
    Feb 2010

    Posted 18 Feb 2010 Link to this post

    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
  2. Dimitrina
    Admin
    Dimitrina avatar
    442 posts

    Posted 23 Feb 2010 Link to this post

    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.
  3. DevCraft banner
  4. Max
    Max avatar
    13 posts
    Member since:
    Mar 2010

    Posted 16 Mar 2010 Link to this post

    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!
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 19 Mar 2010 Link to this post

    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.
  6. Max
    Max avatar
    13 posts
    Member since:
    Mar 2010

    Posted 19 Mar 2010 Link to this post

    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
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 24 Mar 2010 Link to this post

    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.
Back to Top
DevCraft banner