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

[Solved] Issue using a panel inside a splitter

1 Answer 41 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
chris
Top achievements
Rank 1
chris asked on 01 Jun 2011, 09:22 PM
Hi,

I am having trouble using a panel inside a splitter pane.  I am using ASP.NET MVC3 with the Razor ViewEngine. My _layout.cshtml page defines the layout of my application with the splitter control with two panes, a Navigational and the MainPane. The content of the Navigational contains the @Rendered command. The MainPane Content contains the @Rendered Command. If I try to put a panel in my a view based on the layout in the section defined in the left pane, the panel will be rendered above the splitter and not inside the Navigational. If I define the pane outside the section, The pane will be rendered as expected in the MainPane.

Thanks in advance for any help.
Chris

1 Answer, 1 is accepted

Sort by
0
chris
Top achievements
Rank 1
answered on 01 Jun 2011, 10:03 PM
Hi,

I solved the problem. Here is my original code inside my view.
@section NavigationArea {
   @{Html.Telerik().PanelBar().Name("TreeView").Items(items =>
       {
           items.Add().Text("Item 1").Items((subItem) =>
                {
                    subItem.Add().Text("Hallo1");
                    subItem.Add().Text("Hallo2");
                    subItem.Add().Text("Hallo3");
                });
           items.Add().Text("Item 2").Items((subItem) =>
           {
               subItem.Add().Text("Hallo11");
               subItem.Add().Text("Hallo21");
               subItem.Add().Text("Hallo31");
           });
       }).Render();}
}
I use a codeblock to define the panel. If I remove the codeblock, the panel is rendered inside the left panel. Here the code.
@section NavigationArea {
   @Html.Telerik().PanelBar().Name("TreeView").Items(items =>
       {
           items.Add().Text("Item 1").Items((subItem) =>
                {
                    subItem.Add().Text("Hallo1");
                    subItem.Add().Text("Hallo2");
                    subItem.Add().Text("Hallo3");
                });
           items.Add().Text("Item 2").Items((subItem) =>
           {
               subItem.Add().Text("Hallo11");
               subItem.Add().Text("Hallo21");
               subItem.Add().Text("Hallo31");
           });
       })
}


Chris
Tags
Splitter
Asked by
chris
Top achievements
Rank 1
Answers by
chris
Top achievements
Rank 1
Share this question
or