Load on demand with xml datasource

6 posts, 0 answers
  1. Udi
    Udi avatar
    36 posts
    Member since:
    Sep 2010

    Posted 12 Dec 2010 Link to this post

    Hello,

    I'm looking for an example, how to use the load on demand mechanisem when my data source is a static xml,
    and not  sql/mdb/datatable sources.

    Is it possible to do it? or i must use the other sources only?
    Can i get an example of that?


    Thanks,

    Oren
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 15 Dec 2010 Link to this post

    Hello Oren,

    Could you, please, specify what will be the role of the TreeView on the page you plan to include it?
    Also, what amount of node will it store - e.g. tens, hundreds or more?
    Another thing that is good to know when planning this is - will the structure of the tree be changed by the user? I.e. are your users going to add, remove change nodes, or they are just going to browse the structure?

    It's good to first clarify these few things before we move to an implementation.


    Regards,
    Nikolay Tsenkov
    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.
  3. Oren
    Oren avatar
    6 posts
    Member since:
    Dec 2010

    Posted 15 Dec 2010 Link to this post

    Hello Nikolay,

    There are some kinds of treeviews:

    Some treeviews can have sometimes thousand of nodes and sometimes hundreds.
    Some of treeviews should have the ability to add/delete/change nodes some only to browse.

    does it help you to understand the needs?

    Thank you,

    Oren
  4. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 20 Dec 2010 Link to this post

    Hello Oren,

    Well, you kind of described all major scenarios in your latest post. I asked about more information so we can design a usage of the RadTreeView specifically for your case (performing and looking best in it).

    I would suggest that you use a db to store the TreeView's data and load nodes on demand with a webService. This means that only on initial load you will have to load the root nodes. Then when expanding the nodes client-side in the background calls to a webService will be executed.

    Here is a demo page showing the webService load on demand with a maximal performance achieved: http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/performance/defaultcs.aspx

    In the webService web method you will have to get the required nodes from the db and send them back to the client.

    Here is a tutorial for the webService load on demand: http://www.telerik.com/help/aspnet-ajax/tree_databindingloadondemandwebservice.html


    Regards,
    Nikolay Tsenkov
    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.
  5. Udi
    Udi avatar
    36 posts
    Member since:
    Sep 2010

    Posted 20 Dec 2010 Link to this post

    Hello Nikolay,

    I forgot to mention that i use a templates for eatch node.
    From my understanding the web service mechanisem doesn't support well at templates.

    The 2 options i have are:

    1. Server side
    2. Client side

    I don't want to use server side because of the post back and the poor performance.
    The Client side has a little bit a poor performance, but it's the only option i have.

    Incase i do the following scenario:

    Taking the xml i have and export it to dataset and from the dataset i  load the nodes on demand.
    Is this scenario harm the performance?

    Oren
  6. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 23 Dec 2010 Link to this post

    Hi Oren,

    My suggestion is to use the ServerSideCallback expand mode and to disable the PersistNodesLoadedOnDemand property of the TreeView. Then expanding the node will cause only recreation of a single node and it's children will be rendered on the server (which usually is the better option).


    Regards,
    Nikolay Tsenkov
    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