TreeList datasources

19 posts, 2 answers
  1. Jerome Prunera-Usach
    Jerome Prunera-Usach avatar
    12 posts
    Member since:
    Oct 2009

    Posted 15 Nov 2010 Link to this post

    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
  2. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 16 Nov 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jerome Prunera-Usach
    Jerome Prunera-Usach avatar
    12 posts
    Member since:
    Oct 2009

    Posted 16 Nov 2010 Link to this post

    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.

  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 16 Nov 2010 Link to this post

    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.
  6. Jerome Prunera-Usach
    Jerome Prunera-Usach avatar
    12 posts
    Member since:
    Oct 2009

    Posted 16 Nov 2010 Link to this post

    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
  7. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 22 Nov 2010 Link to this post

    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.
  8. Jerome Prunera-Usach
    Jerome Prunera-Usach avatar
    12 posts
    Member since:
    Oct 2009

    Posted 22 Nov 2010 Link to this post

    Thank you for your answer.
  9. Brinda
    Brinda avatar
    9 posts
    Member since:
    Dec 2010

    Posted 08 Dec 2010 Link to this post

    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?
  10. Vinkel
    Vinkel avatar
    36 posts
    Member since:
    Apr 2010

    Posted 08 Dec 2010 Link to this post

    No, no detailbind event, dear - read the telericks replay before.

    -J
  11. Brinda
    Brinda avatar
    9 posts
    Member since:
    Dec 2010

    Posted 08 Dec 2010 Link to this post

    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?
  12. Lucien
    Lucien avatar
    13 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

     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
  13. Brinda
    Brinda avatar
    9 posts
    Member since:
    Dec 2010

    Posted 21 Dec 2010 Link to this post

    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

  14. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 27 Dec 2010 Link to this post

    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.
  15. mr_dummy
    mr_dummy avatar
    4 posts
    Member since:
    Nov 2010

    Posted 20 Jan 2011 Link to this post

    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.
  16. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 25 Jan 2011 Link to this post

    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.
  17. Robert Schoen
    Robert Schoen avatar
    17 posts
    Member since:
    Sep 2008

    Posted 26 Mar 2011 Link to this post

    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.
  18. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 28 Mar 2011 Link to this post

    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
  19. Matthew
    Matthew avatar
    1 posts
    Member since:
    Feb 2011

    Posted 16 May 2011 Link to this post

    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?
  20. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 19 May 2011 Link to this post

    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.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017