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

[Solved] Panelbar RenderPage bug?

3 Answers 21 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matt
Top achievements
Rank 1
Matt asked on 26 Jan 2012, 05:36 AM
I am having a problem where I have a MVC razor layout that has a Telerik MVC Panelbar on it. Everything works fine until I add a RenderPage() above the panel bar in my <header></header> tag for the purpose of using a shared header navigation. When I add this in, the PanelBar simply doesn't render any html and no errors occur. If I take the RenderPage and put it below the panelbar code in the same layout file, everything works fine. If I take the panelbar code and put it in a different cshtml file and call RenderPage to pull it back in to the layout, it works fine.There seems to be some sort of bug going on here. I am using Telerik.Web.Mvc version 2011.3.1306.340

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Jan 2012, 10:11 AM
Hi Matt,

 I tried to reproduce the problem locally, but everything worked as expected. It is possible that some code in your header page might interfere with the panelbar, but without being able to reproduce the problem locally, we cannot be of much help.

Could you please check the attached project and modify it so it reproduces the same problem? Attach it back and I will check it right away.

Greetings,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Matt
Top achievements
Rank 1
answered on 26 Jan 2012, 02:51 PM
I am able to reproduce it. I am using Areas. So I added an area in and now you can see it do it. 

If you open this URL the panel bar will not load

http://localhost/dashboard/status 


if you remove this line from Areas/Dashboard/Views/Shared/_Layout.cshtml the panel bar will load
@RenderPage("~/Views/Shared/_Header.cshtml")
0
Georgi Tunev
Telerik team
answered on 30 Jan 2012, 01:55 PM
Hi again Matt,

Thank you for the project - now I see what the problem is.
Actually, I found a couple of problems in the code:
1. You manually import jquery in the view, but you don't disable the automatic insertion of the same script it from the ScriptRegistrar.
2. In your area's layout file, you use server block (@{...} )to add the panelbar, while you should use @(... ).

Once I fixed these problems, the panelbar was displayed as expected.


Kind regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
PanelBar
Asked by
Matt
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Matt
Top achievements
Rank 1
Share this question
or