ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: jplevene on May 01, 2024, 01:21:46 am

Title: Event for check box select/deselect all
Post by: jplevene on May 01, 2024, 01:21:46 am
What is the event for the checkboxes when the select/deselct all checkbox is clicked?

colModel:[
            // Checkbox selector
            {
               dataIndx: "state", maxWidth: 30, minWidth: 30, align: "center", resizable: false,title: "",
               editable: true, // Must be true or can't select
                    menuIcon: false,
                    type: 'checkBoxSelection',
               cls: 'ui-state-default',
               sortable: false,
               editor: false,
                    dataType: "bool",
               sortable:false,
                    cb: {
                        all: true, //checkbox selection in the header affect current page only.
                        header: true //show checkbox in header.
                    }
                },
Title: Re: Event for check box select/deselect all
Post by: paramvir on May 01, 2024, 11:35:57 am
Following events are fired for all checkbox related actions.

https://paramquery.com/pro/api#event-beforeCheck

https://paramquery.com/pro/api#event-check

Header checkbox ( select / deselect all ) can be differentiated from body originated checkbox actions by ui.rows.length and evt.originalEvent.target.