Hi.
I need to customize clasicall colum menu of grid. Insted of him i need to show his "Filter" - submenu.. But only on some columns. I solved this by cobe below:
function columnMenuInit(e, data) { var self = this; var field = e.field; var gridId = "GridODU"; self.tr = this.thead.find("[data-field=" + e.field + "]"); if (field !== "Id" && field !== "id" && field !== "DruhPrijmu_Code" && field !== "ZuctovaciSymbol_Code") { var menu = e.container.children().data("kendoMenu"); var filterMenuOptions = self.tr.data("kendoColumnMenu").filterMenu.options; var menuParentWrapper = menu.wrapper; menuParentWrapper.removeAttr('class'); menuParentWrapper.attr('class', 'k-reset'); menuParentWrapper.html(""); menuParentWrapper.append("<li class='customMenu'></li>"); if (filterMenuOptions.name == "FilterMultiCheck") { menu.wrapper.find(".customMenu").kendoFilterMultiCheck(filterMenuOptions);; } else { menu.wrapper.find(".customMenu").kendoFilterMenu(filterMenuOptions);; } }}
This solution works like I expected, but there is problem with doubled request to server for column fiter data. First request is made before columMenuInit event (thid fill with data filter submenu) and inicialization of kendoFilterMenu / kendoFilterMultiCheck in columMenuInit event cause second request.
Is there some way how to do only one request ? Or is there any other solution how to achieve desired behaviour ?
Thanks!