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

TreeList datasources

18 Answers 466 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Jerome Prunera-Usach
Top achievements
Rank 1
Jerome Prunera-Usach asked on 16 Nov 2010, 12:09 AM
Hello,

maybe I am missing something, but basically I am trying to load the Treelist on demand only, loading the data as the user drilldown.
Is it possible to do such a thing with the current treelist control ?

I cannot seem to find any property to set on the server side in order to tell that an item has children and therefore needs to have the "expand" capability.

The idea would be to use functionalities such as WebMethod databinding (treeview) in order to do a proper drilldown in the treelist.

Is/will something like this be possible ?

Thank you

18 Answers, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 16 Nov 2010, 01:20 PM
Hello Jerome,

Currently RadTreeList exposes single load mode - server-on-demand - which loads the nested items below the expanded parent on demand. We will consider exposing additional load modes for the future versions of the product.

Thank you for sharing your ideas with us - your Telerik points have been updated for the feedback.

Kind regards,
Sebastian
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jerome Prunera-Usach
Top achievements
Rank 1
answered on 16 Nov 2010, 04:43 PM

Thank you for your quick response.

I don't mind using the server-on demand load, but I think I am misusing it or I do not understand exactly how to use it. When I bind the first level data, how can I tell the control that a specific item has children and therefore show the expand icon ?

 

Do we have to bind the entire dataset to the control or can we only bind a level 1 data and then use the OnNeedDataSource to load n-level data ? (I don’t know if I’m making any sense right now)

 

Thank you for your support.

0
Sebastian
Telerik team
answered on 16 Nov 2010, 06:08 PM
Hi Jerome,

You do not need to worry about the expand icons - RadTreeList will show them automatically for items which have child records when it resolves its data source.

Best regards,
Sebastian
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jerome Prunera-Usach
Top achievements
Rank 1
answered on 16 Nov 2010, 06:13 PM
Well that is the core of my problem.

I do not want to load the entire set of data because it takes too long, I only want to show the level-1 items and if there are child records that I know of, display the expand functionality so that if the user click on it, it trigger the OnNeedDataSource for the item in question.

Are you telling me that I have to pass the entire set of data (from level 1 to level n) to the treelist in order to use it ?

I'm sorry if i'm asking too many questions but I really want to make sure before I decide or not to use such controls for my projects.

Thank you again
0
Accepted
Sebastian
Telerik team
answered on 22 Nov 2010, 11:07 AM
Hello Jerome,

Please excuse me if my previous explanation was not descriptive enough.

RadTreeList will resolve its entire data source in order to determine which items have child items and display their expand/collapse icon, grid lines, as well as keep their expanded state.

However, treelist items which are not visible in the current view will not be loaded initially and will be loaded dynamically when their parents are expanded. Furthermore, operations like sorting, paging, etc. will be performed against the visible set of treelist items.

I hope this explanation is helpful.
 
Kind regards,
Sebastian
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jerome Prunera-Usach
Top achievements
Rank 1
answered on 22 Nov 2010, 02:56 PM
Thank you for your answer.
0
Brinda
Top achievements
Rank 1
answered on 08 Dec 2010, 03:12 PM
Hi

Is there a event called "DetailTableDataBind" in tree list as like in rad grid self hierarchy so that when i expand the particular row,the corresponding sub level will get loaded

Please can anyone help me? its urgent?
0
Vinkel
Top achievements
Rank 1
answered on 08 Dec 2010, 03:47 PM
No, no detailbind event, dear - read the telericks replay before.

-J
0
Brinda
Top achievements
Rank 1
answered on 08 Dec 2010, 04:06 PM
Hi
thanks for quick reply Vinkel ,

I am having a result set with the structure of
Level1                         Level2           Level3               CalcField
---------------------------------------------------------------------------
Akron                Cleveland OH         2007-QTR 1     206172.0000
Akron                Cleveland OH         2007-QTR 2     225291.0000
Akron                Cleveland OH         2007-QTR 3     210866.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 1 27241.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 2 62850.0000
Allen                  Dallas-Fort Worth  TX 2009-QTR 3 100539.0000

And the output of the treelist should be,
Akron
        Cleveland OH               642329.0000
               2007-QTR 1         206172.0000
               2007-QTR 2         225291.0000
               2007-QTR 3         210866.0000
Allen  
       Dallas-Fort Worth         90091.0000
               TX 2009-QTR 1   27241.0000
               TX 2009-QTR 2   62850.0000

I have gone through the samples with ParentKeyname and DataKeyNames Concept.But i dont have the parentid concept in my query.
Any best way to achieve this?
0
Lucien
Top achievements
Rank 2
answered on 08 Dec 2010, 04:34 PM
 Hi Brinda,

you should provide to the treelist a table with a structure like this, to achieve the desired behavior:

Level                        CalcField      ID    ParentID   
------------------------------------------------------------------------------------
Akron                                           1   NULL   (very first level)
Cleveland OH          642329.0000    2   1
2007-QTR 1           206172.0000     3   2
2007-QTR 2           225291.0000     4   2
2007-QTR 3           210866.0000     5   2
Allen                                             6   NULL   (very first level)
Dallas-Fort Worth     90091.0000     7   6
TX 2009-QTR 1       27241.0000     8   7
TX 2009-QTR 2       62850.0000     9   7

And also
DataKeyNames ="ID"
ParentKeynames="ParentID"

Hope this helps
Lucien
0
Brinda
Top achievements
Rank 1
answered on 21 Dec 2010, 03:34 PM
Hi ,
    Thanks all for the reply and also i have successfully framed the tree list structure but the difficulty what i am facing is performance issue.
The thing is ,i am getting 17,000 records from the database and i am binding the same to the treelist but it takes hardly 20 minutes to get loaded and also when i expand it takes 20 mins..

can anyone say me what i am doing wrong

0
Nikolay Rusev
Telerik team
answered on 27 Dec 2010, 03:58 PM
Hello Brinda,

Few thinks you should have in mind when binding RadTreeList:
 - RadTreeList need to iterate through all it's data source in order to group the data to be displayed
 - RadTreeList binding performance depends on the structure of the data source, i.e nested levels, which items are expanded etc.
 - RadTreeList performance depends on whether paging is enabled or not.

I've tried on my end binding to 17 000 records flat structure/only root items/ and took less then 3 min to bind and render RadTreeList.

However along with the new futures for RadTreeList we are working some optimizations in RadTreeList mechanics.

All the best,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
mr_dummy
Top achievements
Rank 2
answered on 20 Jan 2011, 06:39 AM
Are there any ways to make paging on db before loading data into treelist.I have a dataset with thousands of records, so I'm very confused when using it and waiting for rendering data.
0
Nikolay Rusev
Telerik team
answered on 25 Jan 2011, 04:24 PM
Hello Jerome,

I am afraid that currently the only option is to provide the whole data source to RadTreeList. This is due to the fact that to determine which items are in current page, the control needs to group it's data source and to count the children of expanded items.

Regards,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Robert Schoen
Top achievements
Rank 1
answered on 26 Mar 2011, 11:58 PM
I too could use a LoadOnDemand feature.   I have a dataset with about 2000 records which seems to take a while to load.   I have had to switch back to the TreeView control to speed this up.
0
Sebastian
Telerik team
answered on 28 Mar 2011, 09:52 AM
Hello Robert,

We are considering virtual loading of RadTreeList items for the next major release of the component, expected in mid summer. This should speed up the performance when the treelist is bound to large number of items.

Kind regards,
Sebastian
the Telerik team
0
Matthew
Top achievements
Rank 1
answered on 16 May 2011, 08:00 PM
I understand that the control has to rebind in most (if not all) postback scenarios.  Are there any datasource types that are better than others to use for larger sets of information?  I am working with an IList source at this time and a 3500 element list with 10 columns takes ~30 seconds to render the page.  I can alternatively supply the data in a Dictonary where the key = parent, any way to connect that in?  Any other structures you can recommend for better performance?
0
Radoslav
Telerik team
answered on 19 May 2011, 01:22 PM
Hi Matthew,

The data structure passed to the RadTreeList is converted to collection of TreeListSourceItems. This conversion is performance optimized and it does not spend much time. However after that building of the TreeListDataItems and rendering them is time consuming operation. So in your case the load on demand functionality is the best option. Changing the initial data source of the RadTreeList could not increase the performance much.

Greetings,
Radoslav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeList
Asked by
Jerome Prunera-Usach
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Jerome Prunera-Usach
Top achievements
Rank 1
Brinda
Top achievements
Rank 1
Vinkel
Top achievements
Rank 1
Lucien
Top achievements
Rank 2
Nikolay Rusev
Telerik team
mr_dummy
Top achievements
Rank 2
Robert Schoen
Top achievements
Rank 1
Matthew
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or