Author Topic: Toolbar checkbox label doesn't show  (Read 3089 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Toolbar checkbox label doesn't show
« on: March 28, 2014, 09:55:49 pm »
Hi guys,
I am trying to have a checkbox on the toolbar that hides columns.
Everything works but I can't add the label to the checkbox. Since I have a 7 checkbox on the toolbar I need to identify them.
The other option is to have a button but I need to change the Label on the button on the click event.
Something like this doesn't show the "Hide Tue' but rather just a checkbox.
                { type: 'checkbox', label: 'Hide Tue', listeners: [
                        { "click": function (evt, ui)
                            {

                            }
                        }
                    ]
                }
Can you help me, please?
Thank you,
« Last Edit: March 28, 2014, 11:15:08 pm by stoodin »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Toolbar checkbox label doesn't show
« Reply #1 on: March 28, 2014, 11:23:51 pm »
label is supported for button only.

you may add a { type: '<span>label of checkbox</span>' }

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: Toolbar checkbox label doesn't show
« Reply #2 on: March 29, 2014, 12:02:35 am »
I managed to do it by
                { type: "<label id='lblMon' >Hide Mon   </label>"},
                { type:"<input type='checkbox' id='chkMon' checked='checked' onclick='HideMonClm(this);'/>"},

since I need to change the label after the click.
I just thought there is any easy way to do it, but seems like not.

Thank you,