Is there a way to add Switch box To a dataview

Hi,
we using a dataview to show and select an article.
Is there any possiblity to add a Switch (view) for each item so the user can set a on/off status?
thanks

Comments

  • with a dataTable I can do this:

    columns:[
    {id:"checked", template:function(obj){
    return <span class="webix_icon switcher fa-toggle-${obj.checked?"on":"off"}"></span>
    }}
    ],

    but is this also possible with dataView?

  • edited January 15

    Hello @wimk ,
    You can solve it via custom HTML template settings for dataview.
    Also, you can track toggle value and update the related property in data items.
    Please take a look at the snippet:
    https://snippet.webix.com/679pn8nx

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!