[英]How to create java script files for MVC functionality
I have created a lot of java script functions to encapsulate crud operations for a kendo grid with the ability to edit data in a new page or a popup dialog. 我创建了很多Java脚本函数来封装Kendo网格的Crud操作,并能够在新页面或弹出对话框中编辑数据。 I am new to javascript. 我是javascript新手。 Is there a way to embed the grid and popup functionality into a script file. 有没有一种方法可以将网格和弹出功能嵌入脚本文件中。 Right now i am using _partial views to and derived classes to do what I want. 现在我正在使用_partial视图和派生类来做我想要的事情。
You can extend the base grid widget and then override the methods to create a new grid that's customized. 您可以扩展基本网格小部件,然后覆盖方法以创建自定义的新网格。
Like this... 像这样...
var CustomGrid = kendo.ui.Grid.extend({
// override the prototype or add custom methods here
});
Here is an article explaining more about how to do that: 这是一篇文章,解释了有关如何执行此操作的更多信息:
http://www.kendoui.com/blogs/teamblog/posts/12-10-16/inheriting_from_custom_widgets.aspx http://www.kendoui.com/blogs/teamblog/posts/12-10-16/inheriting_from_custom_widgets.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.