hello,
I am drawing one page like this: In panelbar, load Splitter widget. When I put Splitter in partial view and use LoadContentFrom to load this partial view. Splitter will not initial/work well.
Here is part code:
1. PanelBar
@(Html.Kendo().PanelBar()
.Name("Panelbar1")
.ExpandMode(PanelBarExpandMode.Multiple)
.Items(panelbar =>
{
panelbar.Add().Text(N5Default.LABEL_MASTER_STRUCTURE).ImageUrl(@Url.Content("~/content/images/controltesting_panel1.png"))
.Expanded(false).LoadContentFrom("SplitterPartial", "Admin");
})
)
2. Splitter
@(Html.Kendo().Splitter()
.Name("SplitterSample")
.HtmlAttributes(new { style = "height:700px;top:-9px;" })
.Orientation(SplitterOrientation.Vertical)
.Panes(verticalPanes =>
{
verticalPanes.Add()
.HtmlAttributes(new { id = "location-structure-top-pane" })
.Scrollable(false)
.Collapsible(true)
.Content(
Html.Kendo().Splitter()
.Name("LocationStructureHorizontalSplitter")
.HtmlAttributes(new { style = "height: 100%;" })
.Panes(horizontalPanes =>
{
horizontalPanes.Add()
.HtmlAttributes(new { id = "location-structure-left-pane" })
.Size("200px")
.Collapsible(true)
.Content("");
horizontalPanes.Add()
.Collapsible(true)
.HtmlAttributes(new { id = "location-structure-right-pane" })
.Content("");
}).ToHtmlString()
);
verticalPanes.Add()
.HtmlAttributes(new { id = "location-structure-bottom-pane" })
.Size("320px")
.Collapsible(true)
.Content("");
})
)
Anybody know why it does not work?
After I use Content to load Splitter and not use LoadContentFrom by partial view, it works.
The below code works well:
@(Html.Kendo().PanelBar()
.Name("Panelbar1")
.ExpandMode(PanelBarExpandMode.Multiple)
.Items(panelbar =>
{
panelbar.Add().Text(N5Default.LABEL_MASTER_STRUCTURE).ImageUrl(@Url.Content("~/content/images/controltesting_panel1.png"))
.Expanded(false).Content(@<div>
@RenderSplitter()
</div>);
})
)
@helper RenderSplitter()
{
@(Html.Kendo().Splitter()
.Name("SplitterSample")
.......
}
Anybody can help? Because I am drawing one complex page. I cannot put all widgets in one page. It will be hard to view. So I want to use partial view to load. Thanks in advance.
Mark
Best Wishes