TreeView with Dates

2 posts, 0 answers
  1. Harry Cardillo
    Harry Cardillo avatar
    9 posts
    Member since:
    May 2009

    Posted 06 Jun 2009 Link to this post

    Hi, my data looks like the following
        SELECT year(scheduledIn) [theYear] 
        , month(scheduledIn)[theMonth] 
        , scheduledIn 
        ,workOrderId 
     
        FROM            [Work Orders] 
        WHERE       aircraftID = 122 
            AND         archived = 0 
            AND completed = 1 
        ORDER BY    year(scheduledIn) DESCmonth(scheduledIn) DESC 

    2008    11    2008-11-20 05:21:55.183    4949
    2008    7    2008-07-09 11:53:59.307    4124
    2008    7    2008-07-14 23:47:14.160    4150
    2007    11    2007-11-07 00:00:00.000    2823
    2007    8    2007-08-08 12:53:24.167    2304

    What I need to do in the TreeView is to display it like this,,,

    2008
    -->-->11
    -->-->-->4949
    -->-->7
    -->-->-->4124
    -->-->-->4150
    2007
    -->-->11
    -->-->-->2823
    -->-->8
    -->-->-->2304

    How can I accomplish this? I need to use this form through my site for various things, so any help would be appreciated. Thanks!

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 08 Jun 2009 Link to this post

    Hi Harry Cardillo,

    RadTreeView does not support binding to such format directly. What it supports is self referencing tables such as the Employees table from the Northwind database. In your case you should query the database, traverse the returned data and create tree nodes on the fly.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top