I want to disable/hide the columnMenu the same way like disabling sorting or filtering... it is not supported the same way as disabling sorting or filtering but only with some Javascript which is not a good solution and not consistent
Hi,
Pertaining to the original issue regarding disabling the columnMenu the same way like disabling sorting or filtering, please take a look at Alex's answer.
To those looking for resources regarding data-menu=""false" not functioning as expected from Kendo UI Grid initialized by a table, I wanted to share the following Bug Report and workaround for the issue:
Using the columnMenuInit event, configure the columnMenu based on the data-menu string property:
function onColumnMenuInit(e){
//Avaliable Grid columns
var columns = e.sender.columns;
//get menuItem inputs
var inputs = $(e.container).find("input");
for(var x = 0; x < columns.length; x++){
//if the column's menu property is set to false
if(columns[x].menu == "false"){
//hide the parent span of the input
$(inputs[x]).parent("span").hide();
}
}
}
Please take a look at this updated Progress Kendo UI Dojo for a live example of the implementation above.
Regards,
Patrick
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
hi there
i have a gird which is created from table
i pass data-menu="false" attribute to th tag for setting column.menu but it is not working. would you please help me?
the demo page is here
Hi,
Thank you for your interest in this feature request.
Currently, we can only remove a column from the items of the column menu by setting column.menu to false:
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.menu
The alternative as Robert mentioned is to use JavaScript for the moment until this feature request gains popularity and can be included in the public API:
https://www.telerik.com/forums/turn-off-column-menu-on-certain-columns#jN6DSOh-lEOertnBWkEJHw
Regards,
Alex Hajigeorgieva
Progress Telerik
I also think that this is easy to achieve and very powerful for grid, sometimes it's needed to disable column menu feature on some columns (for example the first one) that are used to other purpouses.
Thank you in advance.