destroy
Prepares the widget 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.
This method does not remove the widget element from DOM.
Example
<div id="configurator"></div>
<script>
$("#configurator").kendoPivotConfigurator({
dataSource: {
type: "xmla",
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
rows: [{ name: "[Product].[Product]" }],
measures: ["[Measures].[Internet Sales Amount]"],
transport: {
connection: {
catalog: "Adventure Works DW 2008R2",
cube: "Adventure Works"
},
discover: {
url: "https://demos.telerik.com/olap/msmdpump.dll",
dataType: "text",
contentType: "text/xml",
type: "POST"
}
},
schema: {
type: "xmla"
}
}
});
var configurator = $("#configurator").data("kendoPivotConfigurator");
configurator.destroy();
</script>