How to add a webix button in a datatable

I made a datatable , in it i need to have a column with buttons , how to add webix button ?? The only solution i came over is to add simple Html button tag.

{
    view: "datatable",
    select: true,
    columns: [{
        id: "title",
        fillspace: 1
    }, {
        id: "votes"
    }, {
        id: "add_btn",
        header: "Details"
    }],
    data: [{
        id: 1,
        title: "The Shawshank Redemption",
        year: 1994,
        votes: 678790,
        rating: 9.2,
        rank: 1,
        add_btn: "<button type=\"button\" style=\"web\">Click Me!</button> "
    }, {
        id: 2,
        title: "The Godfather",
        year: 1972,
        votes: 511495,
        rating: 9.2,
        rank: 2
    }, {
        id: 3,
        title: "The Godfather: Part II",
        year: 1974,
        votes: 319352,
        rating: 9.0,
        rank: 3
    }, {
        id: 4,
        title: "The Good, the Bad and the Ugly",
        year: 1966,
        votes: 213030,
        rating: 8.9,
        rank: 4
    }, {
        id: 5,
        title: "My Fair Lady",
        year: 1964,
        votes: 533848,
        rating: 8.9,
        rank: 5
    }, {
        id: 6,
        title: "12 Angry Men",
        year: 1957,
        votes: 164558,
        rating: 8.9,
        rank: 6
    }],
}

Hello,

you can define ‘template’ for the columns and set onClick handler:

http://webix.com/snippet/0232857c

Is it possible to add a switchbutton in the same manner? I can’t seem to figure out the html for adding a switchbutton.

For switch button you need to use a template with ActiveContent enabled by a separate mixin.

With 7.0 ActiveContent is obsolete. How can we make the switchbutton function without using ActiveContent?

Hello @klompenrunner,
You can use template as in the example below:
https://snippet.webix.com/g4ff66lq