jQWidgets Forums

jQuery UI Widgets Forums Grid change color of collapse button

This topic contains 6 replies, has 2 voices, and was last updated by  bach 8 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • change color of collapse button #88350

    bach
    Participant

    I’ve got a grid with row details.
    When certain criteria are met within that detail grid, I’d like to change the background color of the expand/collapse button for that row. Is that possible?

    change color of collapse button #88357

    Christopher
    Participant

    Hi bach,

    Sure, it’s possible. All you have to do is bind to the ‘rowcollapse’ event of the jqxGrid and listen for the changes that you want to make in the details of that row and if the desired criteria is met you can change the color of the expanded button. I made you an example:
    http://jsfiddle.net/z9br38f0/34/

    Best Regards,
    Christopher

    jQWidgets Team
    http://www.jqwidgets.com

    change color of collapse button #88386

    bach
    Participant

    That’s fantastic, and very easy. Thank you!

    change color of collapse button #88388

    bach
    Participant

    Actually, that almost works, but not quite for me.
    I have multiple grids on my page and multiple pinned columns in each of those, so anything after the first row of the first grid is incorrect.

    I’m using an editable nested grid as my row details.
    Is there a way to do something similar using a cellendedit function on that detail grid?

    change color of collapse button #88389

    bach
    Participant

    here’s a fiddle that’s close to my setup

    http://jsfiddle.net/z9br38f0/39/

    change color of collapse button #88431

    Christopher
    Participant

    Hi bach,

    Usually, what you want to do isn’t available trough the jqxGrid API. So what I’m giving you is a workaround which might not be universal, but will work in your scenario. Here is the updated link:
    http://jsfiddle.net/z9br38f0/41/

    Yes you can do the same in the ‘cellendedit’ event handler. The background will be colored when cell edit has ended.

    Best Regards,
    Christopher

    jQWidgets Team
    http://www.jqwidgets.com

    change color of collapse button #88449

    bach
    Participant

    pretty good, but it messes up when you drop down one that’s already highlighted. I think it has to do with the additional row being created for the details.
    I think I’ll have better luck putting my signaling into one of the grids actual cells instead of the collapse arrow. Thanks for your help!

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

You must be logged in to reply to this topic.