0

我刚刚开始学习 Kendoui,并且已经掌握了网格等。

但是我想为网格中的项目创建一个详细信息表单页面,以便可以更新它们。我在 Kendoui 网格中使用了弹出功能,这很好,但由于表单的大小,我真的需要在单独的页面上使用它。

问题是他们的网站上没有绑定远程数据源的简单表单的示例。

我想知道是否有人可以告诉我最好的使用方法,也许给我一个简单的例子。

谢谢

4

2 回答 2

2

You are right!, there is no standard way of creating a custom popup editor but we should recognize that there is not because being custom, there is no easy (possible?) way of doing it since each of us will request a different thing.

BUT that doesn't mean that you cannot (pretty easily) do it.

These are, basically (as far as I can see), the steps to follow:

  1. Define your own way of "poping-up" that window containing your complex form. You can do it by selecting a row and then click a custom toolbar button.
  2. Get the data of the selected row,
  3. Bind the data to you popup window using kendo.bind
  4. When closing this window since the data is bound to the datagrid, the DataSource.transport.update is invoked and your data in the server is updated.

You might also be interested on taking a look into this answer that shows how to bind data to a window including reference to an example in JSFiddle.

This might seem harder than what it actually is but if you are familiar with the different KendoUI widgets, it is actually pretty easy.

于 2013-01-26T15:31:55.787 回答
1

这是我制作的一个应用程序示例,它演示了详细信息页面的网格视图,它使用 Angular 进行导航。后端数据库是 Wakanda 自定义 nosql 数据库,但您可以使用任何数据源或本地数据。让我知道这是否有帮助,或者您需要对该项目的任何进一步解释。MVVM 更新了一些函数的代码注释。

第一个例子是MVVM

下一个示例相同的项目但不使用 MVVM只是使用 jquery 从数据源手动设置输入值

这是它的样子的视频

于 2013-01-26T19:40:30.883 回答