RadSpreadsheet in RadWindow

3 posts, 1 answers
  1. Fit2Page
    Fit2Page avatar
    442 posts
    Member since:
    Feb 2007

    Posted 28 Jun 2018 Link to this post

    Hi,

    When I place RadSpreadsheet in a Radwindows ContentTemplate, no sheet is shown when I open the window.

    The sheet is correctly shown when I click a toolbar item or switch Sheets.

    I load the Excel in Page_Init, just like the demo page.

     

    Can you reproduce this faulty behavior?

     

    BR, Marc

  2. Answer
    Tsvetomir
    Admin
    Tsvetomir avatar
    392 posts

    Posted 02 Jul 2018 Link to this post

    Hi Marc,

    I have created a sample project which resembles the desired scenario - a RadSpreadsheet inside a ContentTemplate.

    In order to have the RadSpreadsheet shown properly inside the ContentTemplate the RadSpreadsheet should be refreshed when the RadWindow is shown and resized. The event OnClientResizeEnd is used to always refresh the RadSpreadsheet when a resize is done. The OnClientShow event is used to repaint the RadSpreadsheet when the RadWindow is shown.

    function repaintSpreadsheet(spreadsheet) {
        spreadsheet.get_kendoWidget().refresh();
    }
     
    function show(sender, args) {
        repaintSpreadsheet($find("<%= RadSpreadsheet1.ClientID %>"));
    }
     
    function OnClientResizeEnd(sender, args) {
        repaintSpreadsheet($find("<%= RadSpreadsheet1.ClientID %>"));
    }
    <telerik:RadWindow runat="server"   OnClientShow="show" OnClientResizeEnd="OnClientResizeEnd" ... >

    I have attached the sample project implementing the suggested approach to my response.

    Regards,
    Tsvetomir
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Fit2Page
    Fit2Page avatar
    442 posts
    Member since:
    Feb 2007

    Posted 03 Jul 2018 in reply to Tsvetomir Link to this post

    Thanks Tsvetomir, works as expected!
Back to Top