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

requirements to destroy() entire grid?

2 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Terry82
Top achievements
Rank 1
Terry82 asked on 10 Oct 2012, 07:35 AM
The docs for the kendoGrid destroy() function are very brief:

destroy

Prepares the Grid for safe removal from DOM. Detaches all event handlers and removes jQuery.data attributes to avoid memory leaks. Calls destroy method of any child Kendo widgets.

var grid = $("#grid").data("kendoGrid");

// detach events
grid.destroy();

Is there any other code required to get his working? Setting it up in exactly the same way I always receive the error:

TypeError: rGrid.destroy is not a function

I have confirmed rGrid is available by adding a hideColumn() call to it before trying destroy, which works correctly.

Any help appreciated.

2 Answers, 1 is accepted

Sort by
0
Tony Sprague
Top achievements
Rank 1
answered on 06 Nov 2012, 01:37 PM
I get the same with kendoEditor. 

0
Atanas Korchev
Telerik team
answered on 06 Nov 2012, 01:46 PM
Hello,

 You are probably using an older version. The destroy method was introduced with Kendo UI 2012 Q2 SP1.

Kind regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Terry82
Top achievements
Rank 1
Answers by
Tony Sprague
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or