-1
columns: [
            {
                data: 'ch',
                type: 'checkbox',
                checkedTemplate: 'yes',
                uncheckedTemplate: 'no'
            }]

If you want to make checkbox like this.. you might thought select all checkbox with obj.setDataAtCell(row, col, "yes");

Juno Im
  • 77
  • 1
  • 8

1 Answers1

-1

but this way is very slow.. So I found the great way to access direct to data object.. And render the data

function checkAll(x) {
    if(x) {
        for(i=0; i<gh.getData().length;i ++)
            console.log(gh.getData()[i].ch = "yes");
    } else {
        for(i=0; i<gh.getData().length;i ++)
            console.log(gh.getData()[i].ch = "no");
    }
    gh.render();
}

Thanks

Juno Im
  • 77
  • 1
  • 8