jeudi 2 avril 2015

Two slickgrid checkboxes for select all

I have two checkbox columns on slick grid and cannot at the moment get the checkboxes to work appropriately. If you check on one side the other side also gets checked, if you select all on either side both sides all get checked. Is there a way to overload the registerplugin on slickgrid to make both checkboxes behave individually?


both columns


Checking on select all selects both columns![][2]



var checkboxApprove = new Slick.CheckboxSelectColumn({
cssClass: "slick-cell-checkboxsel"});
columns.push(checkboxApprove.getColumnDefinition());

var checkboxDeny = new Slick.CheckboxSelectColumn({
cssClass: "slick-cell-checkboxsel"});
columns.push(checkboxDeny.getColumnDefinition());


$(function () {
for (var i = 0; i < 10; i++) {
var d = (data[i] = {});
d["title"] ="Task "+ i;

}

grid = new Slick.Grid("#myGrid", data, columns, options);

grid.setSelectionModel(new Slick.RowSelectionModel({ selectActiveRow: false }));

grid.registerPlugin(checkboxApprove);
grid.registerPlugin(checkboxDeny);

var columnpicker = new Slick.Controls.ColumnPicker(columns, grid, options);

grid.render();




Aucun commentaire:

Enregistrer un commentaire