简体   繁体   English

为什么在asp.net mvc kendoui网格中弹出窗口的打开事件不起作用?

[英]why open event of the popup window in the asp.net mvc kendoui grid doesnt work?

I used asp.net mvc kendoui to create a new website.I used kendoui grid to create a grid list and used the Popup template window to edit.but when i wanted to test the open event of the popup window,i found it doesnt work.And when i saw the html source code generated by kendoui,i found the js handler did not exist in the grid code.Can anyone help?Anyone had the same issue? 我使用asp.net mvc kendoui创建了一个新网站。我使用kendoui grid创建了一个网格列表,并使用了Popup模板窗口进行编辑。但是当我想测试弹出窗口的打开事件时,我发现它不起作用当我看到kendoui生成的html源代码时,发现网格代码中不存在js处理程序。有人可以帮忙吗?有人遇到同样的问题吗? The code like: 代码如下:

@(Html.Kendo().Grid<T>().Name("test")....Editable(edit=>edit.Mode(GridEditMode.Popup).TemplateName("Editor").Window(w=>w.Events(e=>e.Open("OpenWindow")))))


<script>function OpenWindow(obj){}</script>

I know this question is old, but Telerik has stated that the events on Popup windows do not work on Razor syntax. 我知道这个问题很旧,但是Telerik说过Popup窗口上的事件不适用于Razor语法。 You would need to use the grid's Edit event. 您将需要使用网格的Edit事件。

Here is the answer from Telerik 这是Telerik的答案

Here is another solution given on Stack Overflow 这是堆栈溢出的另一种解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM