Okay
  Public Ticket #2704967
custom css for grouped table rows
Closed

Comments

  • Rebecca Burrell started the conversation

    Is there a way to specify formatting for grouped table rows?  

    The screengrab below is sort of what I'm trying to do - The table is grouped by a 'Meet' column, and I would like to format these rows a different color to help them stand out.

    6373299058.png


  • [deleted] replied

    Hi Rebecca

    Thank you for reaching out to us.

    Something like this is only possible with custom CSS, as wpDataTables doesn't have options to change background for grouped rows. You can also add a custom CSS class, which will be later defined in wpDataTables settings/Custom JS and CSS/Custom CSS field. Please note that this falls under custom work, and is not included in the provided support for the plugin but I have found an example you can try.

    You can try with this:

    td.group.tier-1, .tier-2, .tier-3, .tier-4, .tier-5, .tier-6, .tier-7, .tier-8 {
    background-color: antiquewhite !important;
    }

    And it will look like this:

    3290486419.png

    Or you can try adding it per wdt_object table ID "table_1", so like this:

    #group-id-table_1_tier-1 > td, #group-id-table_1_tier-2 > td, #group-id-table_1_tier-3 > td, #group-id-table_1_tier-4 > td, #group-id-table_1_tier-5 > td, #group-id-table_1_tier-6 > td, #group-id-table_1_tier-7 > td, #group-id-table_1_tier-8 > td, #group-id-table_1_tier-9 > td, #group-id-table_1_tier-10 > td {
    color: white !important;
    }

    I hope this helps, do let us know if there is anything else we can assist you with.

  • Rebecca Burrell replied

    This is really helpful - thank you!!

  •  472
    Isidora replied

    Hi Rebecca,

    Blaženka is out of the office today and I will answer you.

    I am glad that Blaženka's solution helps you out.

    If you have any other issues or questions please open a new ticket, and we help you out.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables