Datatable with collection and template

Hi webix team,
at I want color the fruits with a template like Code Snippet but this don’t work together with the fruits collection.
Thanks for advice

Hey @RainerRoss
As a rule, template of a data component (list, tree, etc.) receives two parameters: obj (data item) and common (set of common elements available for adding)

Template of a column receives an extended set of parameters:

  1. obj (item)
  2. common (set of common elements)
  3. actual value of a cell
  4. column configuration
  5. index of the item
template: function(obj, common, value, column, index) {

return obj.title;


Based on this, you can access the collection in the columns template using the 4th template argument (column => column.collection)

Here is the sample in documentation

Please, check out the snippet with answer for your question.