具有级联DropDownList的Kendo UI Grid [英] Kendo UI Grid with Cascading DropDownList
问题描述
在这个网格中,我希望有一组3个下拉列表,它们是:
|| ProductGroups | V || ||产品| V || ||服务| V ||
我希望实现的行为是,当我向网格添加一行时,首先选择组,下拉菜单更新为按照GroupId(value)
过滤的产品列表,比选择产品更新,并且与第一个一样,更新服务下拉列表,并使用由productId(值)过滤的服务。
我不太懂得如何实现这一点,任何人都可以请我帮忙吗?
谢谢大家的帮助。
最好的问候。
最简单的方法是使用级联下拉列表:
http://demos.kendoui.com/web/dropdownlist/cascadingdropdownlist.html
编辑模板中的每一列。
如果您使用的是弹出式编辑,您可以考虑自定义如下所示的弹出式菜单:
http://www.kendoui.com/code-library/mvc/grid/custom-popup-editor.aspx
如果您使用InLine编辑,则应使用此方法自定义编辑器模板:
http://docs.kendoui.com/documentation/getting-started/using- kendo-with / aspnet-mvc / helpers / grid / editor-templates
如果您使用的是InCell - 让我们说它是不可能的。 >
I have a Kendo UI Grid on my Razor Layout which fetches data from the controller.
In this grid i wish to have a set of 3 dropdownlists which are:
|| ProductGroups |V|| || Products |V|| || Services |V||
The behaviour I wish to implement is, when I Add a row to the Grid, I choose the group first, and the Products Dropdown is updated with products list filtered by GroupId (value) than select Product and, like the first one, update the Services dropdown with services filtered by productId (value).
I don't quite know how to achieve this, can anyone please help me?
Thank you all for your help.
Best Regards.
The easiest way would be to use the cascading dropdownlists: http://demos.kendoui.com/web/dropdownlist/cascadingdropdownlist.html inside of the editor templates for each of these columns.
If you are using popup editing you might consider customizing the popup menu like here: http://www.kendoui.com/code-library/mvc/grid/custom-popup-editor.aspx
If you are using InLine editing you should use this approach to customize the editor templates: http://docs.kendoui.com/documentation/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/editor-templates
If you are using InCell - lets just say its not possible.
这篇关于具有级联DropDownList的Kendo UI Grid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!