Handling events from a Kendo MVC Grid's PopUp editor window

坚强是说给别人听的谎言 提交于 2019-12-02 03:43:44

The "events" of the kendo grid popup are not honoured/serialized (at least not the last time I tested this back in 2014) and so you should use the grid's Edit event to control the "Pop Up" window events

So within your grid add this:

.Events(event => event.Edit("onEdit"))
.//other grid settings here. 

Then add a javascript function like this:

function onEdit(e) {

    //get window object
    var kendoWindow = e.container.data("kendoWindow");

        kendoWindow.setOptions({
            title: "I have a custom Title"

            //do stuff in here 

        });


}

Then you can apply what ever functions you want to the window via javascript.

I do something similar to this to resize the pop up editor so it takes up 80% of the screen size regardless of the display/device.

If you have something more specific you are after then I will update my answer accordingly.

edit: If you want you can refer to this post from Telerik's own forums which is what I used when I first encountered this issue back in mid 2014.

Kendo Pop Up Editor not firing off applied events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!