Spreadsheet in Partial view not loading properly

3 posts, 0 answers
  1. Rachael
    Rachael avatar
    5 posts
    Member since:
    Jan 2016

    Posted 18 Jul Link to this post

    hi there,

    So I need to display a spreadsheet in a kendo window, and am loading the windows content via a partial view. However whenever I add the spreadsheet to the partial view I get this error upon page load in kendo.all.js: Unable to get property '_grid' of undefined or null reference

    When I add the spreadsheet to a regular view it loads as expected. If it's in the partial view it has all the tabs at the top (Home, Insert and Data) and the header info, just no grid or any of the sheets defined. I attached a picture.

    I am using MVC with razor.

     

    Is there any fix for this or is it a known issue?

    Thanks,

    Rachael

  2. Rachael
    Rachael avatar
    5 posts
    Member since:
    Jan 2016

    Posted 18 Jul Link to this post

    I actually would like to post an update on this.

    I found that the spreadsheet loads just fine in the window as long as the window is not hidden on page load.

    Currently the spreadsheet does not render correctly unless it is visible on page load, regardless of if it is in the window or not. Is there a way around this or is this a bug?

    I'd really like to toggle the visibility of the spreadsheet as I will be using it for editing on this web page.

  3. Kendo UI is VS 2017 Ready
  4. Rachael
    Rachael avatar
    5 posts
    Member since:
    Jan 2016

    Posted 19 Jul Link to this post

    In case anyone stumbles upon this, this is how you refresh a spreadsheet if it was hidden.

    $("#spreadsheet").show();
    $("#spreadsheet").data("kendoSpreadsheet").refresh();

Back to Top