Reputation: 31
I am trying to create a Kendo grid with dropdown templates in cells users can submit as part of a form, using these two articles:
https://docs.telerik.com/kendo-ui/knowledge-base/grid-dropdownlist-column-template https://docs.telerik.com/kendo-ui/knowledge-base/grid-submit-with-form
The dropdowns look good when they bind to the data, but when adding a new record or modifying an existing one, they quickly break and become text inputs.
Here's my code. https://dojo.telerik.com/@ben-clark/uREGoBUD
Any ideas?
Upvotes: 2
Views: 563
Reputation: 31
There were a few problems with my initial attempt.
// in the grid object
beforeEdit: function(e){
if (!e.model.isNew()) {
e.preventDefault();
}
}
Huge credit to @CarlosMartins for the abstract comment.
Solution code: https://dojo.telerik.com/@ben-clark/uREGoBUD/10
Upvotes: 1
Reputation: 895
Just remove the line editable: "incell",
from your grid
object and it will work!
Upvotes: 0