ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: ibizlink on January 19, 2022, 10:07:10 am

Title: checkbox and getCheckedNodes
Post by: ibizlink on January 19, 2022, 10:07:10 am
Hi ,

I am using checkbox and render it as per below.

In UI, it works as checked but when I use getCheckedNodes, it returns null value.
(All checked in checkbox in UI but no return for getCheckedNodes)

Am i missing something here?



 render: function (ui) {
                            const cards = $this.variables.vSetIDs ?? [];
                            let checked = '';
                            if (ui.cellData == null) {
                                //init
                                if (cards.includes(ui.rowData.cardid)) {
                                    checked = 'checked';
                                }
                            }
                            else {
                                if (ui.cellData) {
                                    checked = 'checked';
                                }
                            }

                            return {
                                text: "<label><input type='checkbox' " + checked + "/></label>"
                            }
                        }
Title: Re: checkbox and getCheckedNodes
Post by: paramvir on January 19, 2022, 11:57:05 am
Checkbox(dataIndx).getCheckedNodes method works with checkbox columns created by defining column.cb property.

https://paramquery.com/pro/api#option-column-cb

Examples:

https://paramquery.com/pro/demos/checkbox

https://paramquery.com/pro/demos/selection_checkbox