View:"counter" inside a Datatable

Hello community,
I´m trying to insert a input counter in my datatable. I don´t want a input from HTML using a Template. I want to use the component “counter” of Webix.

Thanks everyone

Hello @CesarCTA ,
Unfortunately, it isn’t possible to insert (directly) Webix components inside other components. In fact, the only option is to use a template property to create complex HTML objects. For example, you can add similar to ui.counter inside a datatable using a template.
Please take a look at the snippet:
https://snippet.webix.com/bvoe37rt
In the same way, you can insert buttons and other controls.

Hello annazankevich,
I really appreciate your answer. Thanks for show me another option, and your example looks very nice.
Have nice day!!

Hello again,
I still working with this. Now my problem is that when I load my information inside my datatable from a json file, the counter dissapears.
I looked for the reason, but I couldn’t find it.
Do you have idea which is the problem here?

Hi @CesarCTA,
The point is that JSON doesn’t support functions, because of it, your template does not work. Webix also hasn’t any special features for such task, but you can try to use the native JS eval() method or something else.

Thank You so much annazankevich!!