One grid controlling another grid

3 posts, 0 answers
  1. Jeff
    Jeff avatar
    7 posts
    Member since:
    Mar 2017

    Posted 18 May 2017 Link to this post

    I have a grid with a change event, that runs a function that builds another grid. My problem is, each time that second grid is loaded, its change event builds upon itself exponentially. 

     

    I have re-created the issue in a fiddle here, https://jsfiddle.net/ctw5gh1o/

    Any thoughts? It's like the data itself is not dumping completely each time the function is referenced

  2. Jeff
    Jeff avatar
    7 posts
    Member since:
    Mar 2017

    Posted 18 May 2017 in reply to Jeff Link to this post

    I'm on a role today with answering my own questions.. Within the function that refreshes the data, emptying the div the grid goes into fixes it. 

     

    $('#refresh').click(function(e) {
         $('#grid').empty();
         load_data();
    });
  3. Preslav
    Admin
    Preslav avatar
    574 posts

    Posted 22 May 2017 Link to this post

    Hi Jeff,

    Thank you for sharing the solution with the community. 

    Another possible approach is invoking the Grid destroy method:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-destroy

    Additionally, more information about destroying Kendo UI widgets is available in this article:

    http://docs.telerik.com/kendo-ui/intro/widget-basics/destroy

    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top