[英]How to access Kendo Grid's column menu only from outside the grid and add the filter option for specific columns in the column header
[英]remove the column header menu in the locked columns from the Kendo Grid
我想刪除Kendo網格中鎖定列之一中的列標題菜單。 我已經嘗試過波紋管,但它僅適用於未鎖定的列。
function removeColumnheaderMenu(gridId) { var grid = $(gridId).data("kendoGrid"); grid.thead.find("[data-field=lockedColumnIwantToRemove]>.k-header-column-menu").remove(); }
這是您的可能解決方案。
var menuItems = $("div.k-grid-header-locked").find("a.k-header-column-menu");
console.log(menuItems);
if(menuItems !== null && menuItems.length > 0)
{
menuItems.each(function(){
$(this).remove();
});
}
});
所有這些操作就是檢查網格的鎖定面,然后檢查是否存在列菜單鏈接,然后刪除找到的所有鏈接。
如果您需要有關此操作的更多詳細信息,或者需要對其進行修改以使其更強大,請大聲疾呼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.