Home > Software design >  jQuery Kendo Grid calling a function from template
jQuery Kendo Grid calling a function from template

Time:12-02

Background: I am attempting to work on a grid where one column can have different editor based on the column value in a Grid. I found a working Here is the screenshot of the ReferenceError I get

CodePudding user response:

Use a function to call your function instead of a template string:

{
  field: 'editor',
  title: 'Editor',
  template: function(dataItem) {
    return customTemplate(dataItem.type, dataItem.editor);
  },
  editor: chooseEditor
}

Fiddle: https://dojo.telerik.com/AluziYAc

  • Related