Is there a way to hide a field in edit popup that should still be visible in the grid itself?
I have tried setting it to hidden:true, but kendo seems to ignore it. When editable is set to false, it hides the textbox but field label is still shown. Is it possible to get rid of both label and textbox?
My datasource:
schema: { total: "Total", data: "Data", model:{ id:"Id", fields:{ Id:{ visible: false, editable:false }, Name:{ editable:true }, NumberOfUsers:{ hidden:true, editable:false } } } }
You showing/hiding columns in KendoUI Grid you should use showColumn and hideColumn and use as argument a number (the index of the column that you want to show/hide) or a string (the name of the field associated in that column). Example: var grid = $("#grid").
$("#grid . k-grid-header"). css('display', 'none'); It hides the whole header, and is slightly better than the css solution because it applies the style directly to the header as an inline style, meaning that the style automatically has higher priority over all other kendo styles.
Similar solution worked for me:
edit: function(e) { e.container.find(".k-edit-label:first").hide(); e.container.find(".k-edit-field:first").hide(); },
There is no such option as "hidden: true" and this is why it is being ignored. You can use the edit event of the grid to hide some element from the popup window:
$("#grid").kendoGrid({ edit: function(e) { e.container.find("input:first").hide(); } });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With