<divid="treeList"></div><script>$("#treeList").kendoTreeList({columns:[{field:"name"},{field:"age"}],dataSource:{data:[{id:1,parentId:null,name:"Jane Doe",age:22},{id:2,parentId:1,name:"John Doe",age:24}]},columnMenu:true,columnMenuInit:function(e){var menu = e.container.find(".k-menu").data("kendoMenu");var field = e.field;
menu.append({text:"Custom"});
menu.bind("select",function(e){if($(e.item).text()=="Custom"){/* The result can be observed in the DevTools(F12) console of the browser. */console.log("Custom button for", field);}});}});</script>
<divid="treeList"></div><script>functiontreelist_columnMenuInit(e){var menu = e.container.find(".k-menu").data("kendoMenu");var field = e.field;
menu.append({text:"Custom"});
menu.bind("select",function(e){if($(e.item).text()=="Custom"){/* The result can be observed in the DevTools(F12) console of the browser. */console.log("Custom button for", field);}});}$("#treeList").kendoTreeList({columns:[{field:"name"},{field:"age"}],dataSource:{data:[{id:1,parentId:null,name:"Jane Doe",age:22},{id:2,parentId:1,name:"John Doe",age:24}]},columnMenu:true});var treelist =$("#treeList").data("kendoTreeList");
treelist.bind("columnMenuInit", treelist_columnMenuInit);</script>