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

TreeView with Dates

1 Answer 47 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Harry Cardillo
Top achievements
Rank 1
Harry Cardillo asked on 06 Jun 2009, 05:25 PM
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!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 08 Jun 2009, 04:33 PM
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.
Tags
TreeView
Asked by
Harry Cardillo
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or