Bug report : #value# undefined in datatable cell template

Hi,

The datatable doc indicate that wa can use #value# in column template to get the result of column format, but this doesn’t work seems to work because #value# is “undefined”

http://webix.com/snippet/f9915e38

http://docs.webix.com/datatable__templates.html#complextemplates

Thanks

In our docs #value# between the hash symbols means the value of any attribute from your data, e.g. if you have data:[{ title:"A" },{ title:"B" }], you should use template:"#title# " to get the value of the title.

Check the correct snippet: http://webix.com/snippet/15c5f18a

I think not because at the top of the doc page there is a yellow panel indicate :

By #value# you can refer to the data property specified for the column. It can be especially useful when you define a common template for several columns.

Moreover, #value# is needed when you cant to combinate a custom “format” function and a template. In my snippet sample, you can try it. The code should show ** A ** in the cell if you replace #value# by #title# you get the unformated value : A whereas the formatted value is ** A

Moreover, in treetable (not datatable in this case) the doc say we must use

template:"{common.treetable()} #value#"}

in the column used to expand the subtable and It print “undefined” too.

This part of the docs is outdated. Sorry for that, we’ll update it ASAP.

But for now, the template works with the hash symbols as I said. For some reasons, the format must be used inside the template as follows: http://webix.com/snippet/c43848d2

As for the treetable, there’s the same solution as for the template.
Please, check the code of the related sample here:

http://docs.webix.com/desktop__treetable.html#initialization

Thanks.

For those who fall here, to use formating in treetable “clickable” column, you must use something like this :

template:function(item, common){ return common.treetable(item, common) + webix.i18n.fullDateFormatStr(item.value)}