This is a migrated thread and some comments may be shown as answers.

PageLayout has layout problems when switching from Visible=False to Visible=True

5 Answers 126 Views
PageLayout
This is a migrated thread and some comments may be shown as answers.
Rémi
Top achievements
Rank 1
Rémi asked on 19 Feb 2016, 03:43 PM

Hi,

 

I have a UserControl including a RadPageLayout. The RadPageLayout is built as the following : 1 one row with 2 layoutColumns and each layoutColumn has "x" rows. When I simply display it, everything is ok.

But in my scenario I don't want to display the UserControl including the RadPageLayout immediatly, so I set its Visible property to False. Then when I set its Visible property to True (by clicking on a button for example) the RadPageLayout layout is broken : the two layoutColumns don't stand side by side anymore.

So to summarize, if at the beginning my UserControl's Visible property is set to True then it's ok, but it's set to False then True I have layout issue.

 

Could you help me to find a solution or a workaround ?

 

Thanks,

Rémi

 

5 Answers, 1 is accepted

Sort by
0
Rémi
Top achievements
Rank 1
answered on 19 Feb 2016, 04:46 PM
It seems that the RadPageLayout inner div's classes are not loaded (ie: t-container, t-row, t-col, t-col-6 etc...).
0
Rémi
Top achievements
Rank 1
answered on 19 Feb 2016, 04:52 PM
Well, my UserControl is inside an UpdatePanel and this UpdatePanel seems to be the problem... If I remove it I have no more problem...
0
Rémi
Top achievements
Rank 1
answered on 23 Feb 2016, 11:01 AM

The problem is that i need this UpdatePanel and I need the PageLayout to be not visible at the beginning. The WebResource of the PageLayout is not loaded and I don't see any errors.

Do you have any idea ?

0
Accepted
Veselin Tsvetanov
Telerik team
answered on 23 Feb 2016, 11:18 AM
Hello Rémi,

The issue in your scenario is caused by the fact that the styles of the RadPageLayout control are not loaded on initial page load. Because of performance optimizations, we check which controls are placed on the page and we load from the dll only those styles that are currently needed. As the User control with the RadPageLayout is not visible on initial load, the styles for this control are not loaded. What I can suggest you as a workaround is to place another empty RanPagelayout on your page. This way the styles will be initially loaded and the layout should appear as expected.

Regards,
Veselin Tsvetanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rémi
Top achievements
Rank 1
answered on 23 Feb 2016, 01:11 PM
Your workaround does the trick, thank you !
Tags
PageLayout
Asked by
Rémi
Top achievements
Rank 1
Answers by
Rémi
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or