I use a splitter with a left and a right pane within a window widget. If I create the window with “Visible(true)” everything works as it should.
But since the window is supposed to be displayed, when the user clicks on a button, I have to use “Visible(false)” and make it visible after the click occurred.
In this case the given pane size of the left pane seems to be ignored and the right pane is not displayed at all(see attached picture).
After manual resize of the splitter, it seems to work. But when I close the window and reopen it via Javascript, the size parameter is still ignored. Instead the
manual chosen size is used. It makes no difference if I use Ajax Loading or direct rendering. My Code:
Window:
Splitter:
Button:
Javascript:
Am I missing something here?
But since the window is supposed to be displayed, when the user clicks on a button, I have to use “Visible(false)” and make it visible after the click occurred.
In this case the given pane size of the left pane seems to be ignored and the right pane is not displayed at all(see attached picture).
After manual resize of the splitter, it seems to work. But when I close the window and reopen it via Javascript, the size parameter is still ignored. Instead the
manual chosen size is used. It makes no difference if I use Ajax Loading or direct rendering. My Code:
Window:
@( Html.Kendo().Window()
.Name("popupSplitter")
.Title("Popup Splitter")
.Draggable(true)
.Modal(true)
.Content(
@<
text
>
<
div
>
@RenderSplitter()
</
div
>
</
text
>
)
.Width(600)
.Height(450)
.Visible(false)
)
@helper RenderSplitter()
{
@Html.Kendo().Splitter()
.Name("MySplitter")
.Orientation(SplitterOrientation.Horizontal)
.HtmlAttributes(new { style = "width: 100%; height: 400px; " })
.Panes(hPanes =>
{
hPanes.Add()
.Size("200px")
.MinSize("100px")
.Content(
@<
text
>
@RenderTreeView()
</
text
>
)
.HtmlAttributes(new { id = "left_pane" });
hPanes.Add()
.Scrollable(true)
.HtmlAttributes(new { id = "right_pane" });
.Content(
@<
text
><
p
>test</
p
></
text
>
);
})
}
<button class=
"k-button"
id=
"btnAdd"
onclick=
"addSomething()"
><span class=
"k-icon k-add"
></span></button>
function
addSomething() {
var
window = $(
"#popupSplitter "
).data(
"kendoWindow"
);
window.center();
window.open();
}
Am I missing something here?