ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: ticheng on February 14, 2017, 09:15:57 am

Title: How to Add Checkbox Label inToolbar
Post by: ticheng on February 14, 2017, 09:15:57 am
I am using pqgrid v2.0.4. In my toolbar, I want to add a checkbox. When it is checked, it filters the result. When it is unchecked, it removes the filter. It works fine. However, I would also add some text beside it, and I tried something like this:

Code: [Select]
{
            type: "checkbox",
            label: "Show Active Only",
            icon: " ui-icon-search",
            listeners: [
                {
                    "change": function() {
                        console.log($(this).is(':checked'));
                    }
                }
            ]
        }
But this does not work. Would any one know how to add the label / text beside this checkbox?

Thanks,
Tim
Title: Re: How to Add Checkbox Label inToolbar
Post by: paramvir on February 15, 2017, 09:57:47 am
label property is supported in Pro only.

In free version, label can be added by using a separate label.

Code: [Select]
{ type: "<label for='wrapText'>Wrap Text</label>" }

Example: https://paramquery.com/demos/freeze_columns
Title: Re: How to Add Checkbox Label inToolbar
Post by: ticheng on February 20, 2017, 09:44:58 am
Thank you. It works fine.