Heres the script for opening the dialog:@(Html.Kendo().Window() .Name("createProjectDialog") .Animation(c => c.Open(builder => builder.Zoom(ZoomDirection.In).Duration(AnimationDuration.Slow)) .Close(builder => builder.Zoom(ZoomDirection.Out).Duration(AnimationDuration.Slow) ).Enable(true)) .Title("Create New Project") .LoadContentFrom("Create", "Projects") .Modal(true) .Draggable(true) .Width(650) .Visible(false))
$("#newProjectbtn").bind("click", function () { $("#createProjectDialog").data().kendoWindow.open(); });
Hi,
Following is the code
<form id="Form1" runat="server">
<div id="ContentDiv">
<% Html.Kendo().Window()
.Name("ContactUsWindow")
.Title("Contact Us.")
.Draggable(false)
.Resizable(resizing => resizing
.MinHeight(300)
.MinWidth(300)
.MaxHeight(500)
.MaxWidth(500)
)
.Actions(actions => actions.Close())
.Content(() =>
{%>
<p>This is window Demo</p>
<%})
.Width(300)
.Height(300)
.Render();
%>
</div>
<% Html.Telerik().ScriptRegistrar()
.OnDocumentReady(() => {%>
var windowElement = $('#ContactUsWindow');
var undoButton = $('#undo');
undoButton
.bind('click', function(e) {
windowElement.data('tWindow').open();
undoButton.hide();
})
.toggle(!windowElement.is(':visible'));
windowElement.bind('close', function() {
undoButton.show();
});
<%}); %>
<span id="undo" class="t-group">Click here to open the window.</span>
</form>
When I close the window the undo button is not working. Is there something I missed to implement?
Regards,
Yeou