This is a migrated thread and some comments may be shown as answers.

One grid controlling another grid

2 Answers 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 18 May 2017, 07:02 PM

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 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 18 May 2017, 07:09 PM

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();
});
0
Preslav
Telerik team
answered on 22 May 2017, 08:29 AM
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.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Preslav
Telerik team
Share this question
or