expand event for TreeList fires before the expand ajax request is completed

10 posts, 0 answers
  1. Ivo
    Ivo avatar
    11 posts
    Member since:
    Mar 2015

    Posted 21 Apr 2015 Link to this post

    If the TreeList branch expand loads remote data, the expand event triggers before the ajax request is completed. Is there any reason for that or it's just a bug?
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 23 Apr 2015 Link to this post

    Hello Ivo,

     

    This behavior is intended, see the quote from the event documentation: "Fired when an item is about to be expanded."

     

    The reason for this is that the event can be prevented.

     

    Regards,
    Nikolay Rusev
    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. Ivo
    Ivo avatar
    11 posts
    Member since:
    Mar 2015

    Posted 24 Apr 2015 in reply to Nikolay Rusev Link to this post

    Is there somewhere an example how to bind to an "on-after-expand" event?
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 28 Apr 2015 Link to this post

    Hello Ivo,

    The following example demonstrates a way to achieve this - http://dojo.telerik.com/@rusev/EGUTI

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Ivo
    Ivo avatar
    11 posts
    Member since:
    Mar 2015

    Posted 02 Jul 2015 in reply to Nikolay Rusev Link to this post

    Thank you very much.

     But I also found, that, "expanded" event is triggered only by clicking on the "expand" icon. TreeList.expand() function does not trigger the event. Is this also intentional or a bug and is there a work around?

     The fact is that when I click - the example above work. When call TreeList.expand() - it does not.

     regs

    Ivo

  7. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 03 Jul 2015 Link to this post

    Hello Ivo,

     

    Yes, the API method will not trigger the event. You should be able to execute the logic for checking model state right after you call expand API.

     

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  8. Ivo
    Ivo avatar
    11 posts
    Member since:
    Mar 2015

    Posted 03 Jul 2015 in reply to Nikolay Rusev Link to this post

    Unfortunately this is not the case, as I want to select (again with an api method) a row that is in the newly loaded with the expand rows. And of course they load asynchr. I found a workaround with the DataBound event... but its a dirty workaround :)

    I saw in some other posts that there was a similar case with Menu expand event which was considered a bug. Would this also be considered as a bug and be fixed soon?

     Thanks

  9. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 07 Jul 2015 Link to this post

    Hello Ivo,

     

    I'm not sure I fully understand the scenario which you described. Can you please simulate it in the dojo example from my previous posts?

     

     

     

    Regards,
    Nikolay Rusev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  10. Mark
    Mark avatar
    3 posts
    Member since:
    Jul 2015

    Posted 19 Aug 2015 in reply to Nikolay Rusev Link to this post

    Is there an activate event for Treelist?
  11. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 24 Aug 2015 Link to this post

    Hello Mark,

    There is no "activate" event exposed by the TreeList. In case you want to find out when an item has been expaded, use the approach provided above that attaches a one-time dataBound handler when an item is about to be expanded.

    http://dojo.telerik.com/@rusev/EGUTI

    Regards,
    Dimo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready