Anand
Anand

Reputation: 47

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. I am also populating my whole Kendo Grid through a separate Api call.

I have a condition that if the value coming from Api is 'Draft' then the Dropdown should be disabled while doing Inline Editing(i.e. when clicked on inline edit button), else it should be enabled.

Upvotes: 0

Views: 6442

Answers (1)

dimodi
dimodi

Reputation: 4139

Use the edit event of the Grid to obtain reference to the DropDownList and disable it (or make it readonly).

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

Upvotes: 1

Related Questions