Spreadsheet Destroy Not Working

4 posts, 1 answers
  1. Marc
    Marc avatar
    161 posts
    Member since:
    Sep 2016

    Posted 18 Jan Link to this post

    I have a spreadsheet widget, which is created on page load. I have a button, which populates the data using the transport layer. Every time the button is pressed I need to destroy the spreadsheet and then recreate it. I am doing the following: (our page uses angularjs in case that relevant)

    if (spreadSheet != null) {

    // recreate spreadsheet here.

    However - the first spreadsheet is not being removed from the DOM.

    Am I missing something?



  2. Christy
    Christy avatar
    48 posts
    Member since:
    May 2016

    Posted 19 Jan in reply to Marc Link to this post

    I am doing something similar with angular and used the following code:

    // In view, k-scope-field = "spreadsheet"
    var spreadsheet = $scope.spreadsheet;
    var sheet = spreadsheet.activeSheet();

    It works pretty well unless the user is in mid-edit when they decide to close that spreadsheet.


  3. Answer
    Stefan avatar
    1131 posts

    Posted 20 Jan Link to this post

    Hello Marc,

    Depending on the desired result, after the widget is destroyed the DOM element have to be removed manually.

    Please check the article in our documentation:


    Also, check the Dojo demonstrating this:


    I hope this will help to achieve the desired result

    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.
  4. Marc
    Marc avatar
    161 posts
    Member since:
    Sep 2016

    Posted 20 Jan in reply to Stefan Link to this post

    Hi Stefan,

    Sorry my mistake! I did read the documentation but I must have missed the bit that mentioned, the HTML which is removed is content outside the widget, and not the widget itself!

    Thanks again,


Back to Top