Destroy Gantt Control
22 Mar 20181 minute to read
Gantt control is composed with more sub-controls like TreeGrid, Splitter, Dialog etc. So while destroying the Gantt control we need to
remove all sub-control elements and unbind all events bound by this control. By using destroy
public method, we can properly remove the Gantt control from DOM.
The following code example explains how to destroy Gantt control.
@(Html.EJ().Gantt("gantt")
//..
)
@(Html.EJ().ScriptManager())
<script type="text/javascript">
$("#gantt").ejGantt("destroy");
<script>
NOTE
If you want to re-initialize Gantt control on same
div
element,
we need to perform destroy action before re-initialize the Gantt.