jQWidgets Forums

jQuery UI Widgets Forums React How to disable buttons in a jqxButtonGroup

This topic contains 1 reply, has 2 voices, and was last updated by  admin 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • nepalmer
    Participant

    Hi,
    I’ve have some standard HTML buttons in a jqxButtonGroup and I’m able to disable the button group, but not the individual buttons.

    This is what I have

    <JqxButtonGroup disabled={disabled} theme={‘office’} onButtonclick={doClick} mode=’radio’>
    <button disabled={disabled} style={{ padding: ‘4px 16px’, height: buttonHeight, width: buttonWidth1, backgroundColor: ‘#1274AC’, color: ‘#ffffff’, borderStyle: ‘inset’ }} id=’0′ value={buttonNames[0]} />
    <button disabled={disabled} style={{ padding: ‘4px 16px’, height: buttonHeight, width: buttonWidth1 }} id=’1′ value={buttonNames[1]} />
    <button disabled={disabled} style={{ padding: ‘4px 16px’, height: buttonHeight, width: buttonWidth1 }} id=’2′ value={buttonNames[2]} />
    <button disabled={disabled} style={{ padding: ‘4px 16px’, height: buttonHeight, width: buttonWidth1 }} id=’3′ value={buttonNames[3]} />
    </JqxButtonGroup>

    When the jqxButtonGroup is disabled, the buttons don’t disable. If I don’t use the jqxButtonGroup then the buttons disable correctly. So it seems like the jqxButtonGroup is somehow messing with the disable behavior of the HTML buttons.

    I would use the JqxButtons buttons but with the standard HTML buttons I’m able to easily see which button is currently selected. With the JqxButton the only way to tell what is selected is by the border of the button which can be hard to see. Also when using the JqxButton I’m not able to preselect a button.

    Thanks


    admin
    Keymaster

    Hi nepalmer,

    To disable buttons in a button group, the disableAt method of the jqxButtonGroup should be used and you need to pass the index of the button to be disabled.

    Best regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.