How change property (attributes) in div class="webix_cell" through jQuery

How to add some data in div the some certain cells (example, add property data-mycount=“xx”) or add font Awesome Icons at cell contents?

It’s possible?

Hello,

You can use ‘template’ property to define cell content:

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

Thanks for the answer.
Unfortunately, the templates for the columns is quite another. :frowning:

ok.
I try to formulate easier.

Tell me, please, how by clicking on the single table cell to add
to the value of this cell (at the beginning of the cell) some icon (exapmle, Font Awesome icon)?

  1. how change programmatically

inner html code for one certain cell

< div class=“webix_cell” > some cell value < /div >

to

< div class=“webix_cell” data-mycount=“5” > some cell value < /div >

it’s possible?

There is not possibility to add an attribute to a cell container. I think that “template” is enough for this task:

http://webix.com/snippet/f3aedc6e

Maria, thanks!

You’re right, your code works.

But your example adds the required data-field as a nested div

(see screenshot):

image uploader

I want to change any cell of the table, without reference to the id of the column
(I have in datatable several thousand columns).

But anyway, yours idea to using Template is good, thank you for your answer.
I try to adapted it for me.

You can set template for all columns. And id passed in onItemClick allows to get both a row and a column:

http://webix.com/snippet/5d5c3414

ok. Thanks.