This is a migrated thread and some comments may be shown as answers.
RadSpreadsheet in RadWindow
2 Answers 11 Views
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 1
Fit2Page asked on 28 Jun 2018, 06:44 AM

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 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 02 Jul 2018, 02:18 PM
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.
0
Fit2Page
Top achievements
Rank 1
answered on 03 Jul 2018, 07:06 AM
Thanks Tsvetomir, works as expected!
Asked by
Fit2Page
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Fit2Page
Top achievements
Rank 1
Share this question
or