Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    how to load Tree nodes on demand for the large trees

    Hi Isomorphic,

    We are using SmartGWT Pro 3.0 branch (02/02/2012 nightly build).

    I have a question on how to load Tree nodes on demand for the large trees.

    Please see the attached code.

    case 1: setAutoFetchData(false) and setLoadDataOnDemand(true) --> do not get data
    case 2: setAutoFetchData(true) and setLoadDataOnDemand(false) --> get all the data; takes long time

    If I need to select some nodes, then sometimes I can get a warning window: "A script on this page may be busy..."

    Can you please tell me how can I load Tree nodes on demand for the large trees?

    Thank you.
    Attached Files

    #2
    Have you read the Tree DataBinding overview? It explains what requests a load on demand TreeGrid will send and how to respond. If you need further help, post the requests and responses as shown in the RPC tab.

    Comment


      #3
      Yes, I've read the Tree DataBinding overview.
      The TreeGrid DataBinding Example in that overview (http://www.smartclient.com/smartgwt/showcase/#tree_databinding_ondemand) is using the regular setAutoFetchData(true), not the setLoadDataOnDemand(true) and setAutoFetchData(false). Can you please provide an example on how to use the combination of the setLoadDataOnDemand(true) and setAutoFetchData(false)?
      My main concern is the time that takes to select all the nodes that I need to select for the large trees and the warning window: "A script on this page may be busy..." (attached)
      Attached Files

      Comment


        #4
        If you set autoFetchData to false, then you must manually call fetchData() to initiate data loading. This is not related to loadDataOnDemand.

        As previously indicated, we would need to see the requests and responses, as well as the DataSource definition, to help further.

        Comment

        Working...
        X