dataBound events fires multiple times

3 posts, 0 answers
  1. Randy
    Randy avatar
    12 posts
    Member since:
    Oct 2012

    Posted 09 Oct 2015 Link to this post

    I am binding a function to the treeView's dataBound event.  I'm using a hierarchical data source with a remote url (web api).  I have found that the event fires once before any data is loaded, again when it is loaded, and again for each time I expand a node.  I know lazy loading is enabled by default, but even so I can see in the network traffic that the entire hierarchical data items are loaded just once.  I guess the tree re-binds at each node Expand.  Then I disabled lazy loading, and now the event fires four times after loading the remote data!  My tree has four top-level nodes, so perhaps once for each node?

     I'd like a dataBound event that fires once and only once, after the data is all loaded.

    version 2015.3.930

    Thanks,

    Randy

     

  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 13 Oct 2015 Link to this post

    Hello Randy,

    The dataBound event is triggered each time the rendered state of the TreeView changes. This may be due to loading of remote data, expanding nodes whose children were not rendered, or when nodes are added and removed. I am afraid that there is no event that is triggered when all data is loaded. If you elaborate what you are trying to achieve, we will be happy to suggest a way to achieve this.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Randy
    Randy avatar
    12 posts
    Member since:
    Oct 2012

    Posted 13 Oct 2015 in reply to Alex Gyoshev Link to this post

    Thanks for the response.  I suspected as much.  I was thinking of the data getting loaded into the dataSource, but this is really an event that is for binding of the data to the treeView, which is different.  What I'm trying to accomplish is a little complicated, I'm going to enter a support ticket for my issue.

    Thanks,

    Randy

     

Back to Top