Anyone get the kendo window to work with partial views? I really enjoy MVC partial views for code resuse and readability, but Kendo windows don't give control back when they are modal. Tried it two different ways: where the content is the partial view and where the partial view contains the kendo window.
It also seems to screw up the other window on the page. If I just have the one normal window, it works. If I have both, they are both broken. If I have just the partial view window, it doesn't work.
It also seems to screw up the other window on the page. If I just have the one normal window, it works. If I have both, they are both broken. If I have just the partial view window, it doesn't work.
5 Answers, 1 is accepted
0
Hello James,
What exactly did you tried, could you share some code?
I tried the following and everything is working fine even with 4 windows:
Kind regards,
Petur Subev
the Telerik team
What exactly did you tried, could you share some code?
I tried the following and everything is working fine even with 4 windows:
@(Html.Kendo().Window().Name(
"test1"
).Draggable().LoadContentFrom(
"TEST"
,
"Home"
))
@(Html.Kendo().Window().Name(
"test2"
).Draggable().LoadContentFrom(
"TEST"
,
"Home"
))
@{Html.Kendo().Window().Name(
"test3"
).Draggable().Content(@<text> @{Html.RenderPartial(
"TEST"
);} </text>).Render();}
@{Html.Kendo().Window().Name(
"test4"
).Draggable().Content(@<text> @{Html.RenderPartial(
"TEST"
);} </text>).Render();}
Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Ezequiel
Top achievements
Rank 2
answered on 04 Apr 2014, 04:20 PM
I just tried:
<%= Html.Kendo().Window()
.Name("WindowTransfer1")
.Title("Window")
.LoadContentFrom("TransferItems", "OrderForm")
.Draggable()
.Resizable()
%>
and
<%= Html.Kendo().Window()
.Name("WindowTransfer1")
.Title("Window")
.Content(() => this.Html.RenderPartial("TransferItems", new FilterTransfer()))
.Draggable()
.Resizable()
%>
inside TransferItems.ascx I have only AAAA
when I use the first option, it displays in the page I'm calling the Partial View.
when I call the second option, it displays nothing in my window when I open it.
<%= Html.Kendo().Window()
.Name("WindowTransfer1")
.Title("Window")
.LoadContentFrom("TransferItems", "OrderForm")
.Draggable()
.Resizable()
%>
and
<%= Html.Kendo().Window()
.Name("WindowTransfer1")
.Title("Window")
.Content(() => this.Html.RenderPartial("TransferItems", new FilterTransfer()))
.Draggable()
.Resizable()
%>
inside TransferItems.ascx I have only AAAA
when I use the first option, it displays in the page I'm calling the Partial View.
when I call the second option, it displays nothing in my window when I open it.
0
Hello James,
Based on the second demos that we have shared online, the ASPX syntax should look like this:
If this does not help, please put your case in a small sample project and send it so we can investigate further.
Kind Regards,
Petur Subev
Telerik
Based on the second demos that we have shared online, the ASPX syntax should look like this:
<asp:Content ContentPlaceHolderID=
"MainContent"
runat=
"server"
>
<% Html.Kendo().Window()
.Name(
"window"
)
.Title(
"About Alvar Aalto"
)
.Content(() =>
{
%>
<div
class
=
"armchair"
>
<% Html.RenderPartial("TransferItems", new FilterTransfer()); %>"
</div>
<%
})
.Draggable()
.Resizable()
.Width(600)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close(
"onClose"
))
.Render();
%>
If this does not help, please put your case in a small sample project and send it so we can investigate further.
Kind Regards,
Petur Subev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Pavel
Top achievements
Rank 1
answered on 17 Sep 2017, 10:32 PM
that clearly is not working...
@(Html.Kendo().Window().Name("confo")
.Title("Order Email")
.Content(() => { Html.RenderPartial("_OrderConfoEmail", Model.Order); } ))
partial content is rendered on page.
0
Hello,
You can use the following syntax to load a partial view in the Window:
Regards,
Ivan Danchev
Progress Telerik
You can use the following syntax to load a partial view in the Window:
@(Html.Kendo().Window().Name(
"confo"
)
.Title(
"Order Email"
)
.Content(@<text>
@Html.Partial(
"_OrderConfoEmail"
, Model.Order)
</text>)
)
Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.