This is my first time using kendo window and I have run into a problem.
I want to use a namespaced function for the OnClose event as below.
@(Html.Kendo().Window()
.Name("CreateProduct")
.Title("Create Product")
.Width(600)
.Modal(true)
.Events(ev => ev.Close("OnClose"))
.Visible(false)
.Content(@Html.Partial("CreationForm").ToString())
)
Right now you can see that I am just using the OnClose function, but I wanted to be able to write something like:
<script>
var CurrentPageNamespace = {};
CurrentPageNamespace.OnClose = function(){
//Do Some Work Here
}
</script>
And then add it to the Window's on close:
@(Html.Kendo().Window()
.Name("CreateProduct")
.Title("Create Product")
.Width(600)
.Modal(true)
.Events(ev => ev.Close("CurrentPageNamespace.OnClose"))
.Visible(false)
.Content(@Html.Partial("CreationForm").ToString())
)
I tested this with a simple alert, and if I removed the namespace from OnClose it would work, and with the namespace included nothing would happen. Is it possible to use a namespace with Kendo UI Window events?
Thanks in advance.
I want to use a namespaced function for the OnClose event as below.
@(Html.Kendo().Window()
.Name("CreateProduct")
.Title("Create Product")
.Width(600)
.Modal(true)
.Events(ev => ev.Close("OnClose"))
.Visible(false)
.Content(@Html.Partial("CreationForm").ToString())
)
Right now you can see that I am just using the OnClose function, but I wanted to be able to write something like:
<script>
var CurrentPageNamespace = {};
CurrentPageNamespace.OnClose = function(){
//Do Some Work Here
}
</script>
And then add it to the Window's on close:
@(Html.Kendo().Window()
.Name("CreateProduct")
.Title("Create Product")
.Width(600)
.Modal(true)
.Events(ev => ev.Close("CurrentPageNamespace.OnClose"))
.Visible(false)
.Content(@Html.Partial("CreationForm").ToString())
)
I tested this with a simple alert, and if I removed the namespace from OnClose it would work, and with the namespace included nothing would happen. Is it possible to use a namespace with Kendo UI Window events?
Thanks in advance.