When a Kendo UI Grid has been initialized via a table, If the user sets the th element with data-menu="false", the menu attribute is read as a string instead of a boolean.
The data-menu configuration should be parsed to a boolean.
hi again . thank you soo much for creating this feed back and your answer . as i was in hurry to fix that problem in our project , I exactly implemented this behavior but your code is mush cleaner than mine so i will use this code.
regards,
Fereshteh
Hi Fereshteh,
I wanted to share the workaround for now in this bug report for those having the same 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/.