Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide checkbox only from header row of a slickgrid

enter image description here

Code1:

var checkboxSelector = new Slick.CheckboxSelectColumn({
                                                          cssClass: "slick-cell-checkboxsel"

                                                      });

tempColumns.push(checkboxSelector.getColumnDefinition());

Code2:

    tempGrid.setSelectionModel(new Slick.RowSelectionModel({selectActiveRow:false}));
tempGrid.registerPlugin(checkboxSelector);

I am using the above code to show the checkbox column.

How to hide checkbox only from header row of a slickgrid? (under red circle in the image)

Thanks.

like image 612
Yellowcake Avatar asked Dec 17 '22 11:12

Yellowcake


1 Answers

grid.onHeaderRowCellRendered.subscribe(function (e, args) {
            if (args.column.id === '_checkbox_selector') {
                // do something if you want
            } else {
                $(args.node).empty();
                $('<input type="text">')
                    .data('columnId', args.column.id)
                    .val(columnFilters[args.column.id])
                    .appendTo(args.node);
            }
        });
like image 77
Ivo Nikolov Avatar answered Dec 21 '22 23:12

Ivo Nikolov