Search code examples
javascriptangularjskendo-uikendo-gridkendo-template

How to hide header template based on condition?


I am new to kendo UI. i have created an Kendo-grid with angularJs . and i have configured an header template to that grid.here the code

headerTemplate: '# if(HierarchyNo!==1){# <i class="fa fa-arrow-circle-left fa-2x"  aria-hidden="true"></i> #}#',

In here HierarchyNo is an Scope variable based on this variable the header template must shown to the user.If i execute the code then there is an design error like enter image description here I do not know what went wrong. is there any way to hide the headerTemplate based on condition. Please help me


Solution

  • use kendo.template("your template with condition"). It will work out.