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

Window Undo not working

0 Answers 69 Views
Window
This is a migrated thread and some comments may be shown as answers.
Yeou
Top achievements
Rank 1
Yeou asked on 14 Sep 2012, 10:27 AM

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

No answers yet. Maybe you can help?

Tags
Window
Asked by
Yeou
Top achievements
Rank 1
Share this question
or