Hi webix team,
at https://snippet.webix.com/hlqwzo58 I want color the fruits with a template like Code Snippet but this don’t work together with the fruits collection.
Thanks for advice
Rainer
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:
- obj (item)
- common (set of common elements)
- actual value of a cell
- column configuration
- 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.