Author Topic: How to Add Checkbox Label inToolbar  (Read 2534 times)

ticheng

  • Newbie
  • *
  • Posts: 6
    • View Profile
How to Add Checkbox Label inToolbar
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6283
    • View Profile
Re: How to Add Checkbox Label inToolbar
« Reply #1 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

ticheng

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: How to Add Checkbox Label inToolbar
« Reply #2 on: February 20, 2017, 09:44:58 am »
Thank you. It works fine.