[英]how to disable a cell in Kendo UI Grid based on its value while Inline Editing?
I have a Dropdown in one of the columns of my Kendo Grid UI whose list I am populating from an Ajax Call of my Web Api by creating kendo DataSource and assigning the DataSource to the Editor of that Column. 我在Kendo Grid UI的一列中有一个下拉列表,通过创建kendo DataSource并将DataSource分配给该列的编辑器,可以从Web Api的Ajax调用中填充其列表。 I am also populating my whole Kendo Grid through a separate Api call.
我还通过单独的Api调用填充了整个Kendo Grid。
I have a condition that if the value coming from Api is 'Draft' then the Dropdown should be disabled while doing Inline Editing(ie when clicked on inline edit button), else it should be enabled. 我有一个条件,如果来自Api的值是“草稿”,则在进行内联编辑时(即,单击内联编辑按钮时)应禁用下拉菜单,否则应将其启用。
Use the edit
event of the Grid to obtain reference to the DropDownList and disable it (or make it readonly). 使用Grid的
edit
事件获得对DropDownList的引用并禁用它(或使其变为只读)。
http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/access-editor-control http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/access-editor-control
http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#methods-readonly http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#methods-readonly
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.