Is it possible to disable column menu for specific column in Kendo UI Grid? And if it is, how it should be done?
The Kendo UI grid widget supports static/frozen columns by a single configuration setting. Simply set the locked attribute of the corresponding column to true, and this will bring the column in the locked columns group positioned on the left in the grid.
kendo:grid-pageable-messagesThe text messages displayed in pager. Use this option to customize or localize the pager messages.
Returns the data item to which the specified table row is bound. The data item is a Kendo UI Model instance.
In order to remove the current filters, apply an empty object as a filter to the DataSource. To remove only a specific filter from the Grid DataSource, the filter object needs to be removed from the filters array.
Out of the box you can only exclude the column from being shown/hidden through the column menu (i.e. there wont be a checkbox defined for that column which you can check/uncheck). To do so you should use the menu option when defining your column. e.g.
jQuery("#Grid").kendoGrid({
"columns": [{
"title": "Person ID",
"menu": false, //this way
"field": "PersonID"
},
{
"field": "Name",
"encoded": true
},
//...
If you want you completely hide the column menu for lets say the 3rd column you can use the following work-around:
$(function(){
$('#GridName .k-header-column-menu').eq(2).hide()
})
You can use this in MVC when defining the columns. Sample code is as as below.
columns.Bound(person => person.FirstName).IncludeInMenu(false);
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