Okay
  Public Ticket #915573
Conditional formatting
Closed

Comments

  •  2
    Stu started the conversation

    I have a column in my wpdatatable that I only want to use for conditonal formatting, but when I hide the column I lose my Conditional formatting, is there a w9rk around?  Also, I do I conditionally format a number range?    Thanks 

  •  2
    Stu replied

    The question has a typo.  **how do I 

  • [deleted] replied

    Hi Stu,

    With wpDataTables built-in functionalities it is not possible to apply conditional formatting on column that is not visible.

    As a workaround you could set conditional formatting for that column that you want to be invisible. For that column DO NOT uncheck visible checkbox because conditional formatting will not be applied in the table.

    After defining rules, to hide that column and to have conditional formatting in same time you will have to add this little script in text tab of your page where the table is located.

    <script>
    jQuery( window ).load(function() {
    wpDataTables.table_1.api().columns(0).visible(false)
    });
    </script>
    

    Where number 0 is the first column in the table, 1 is second, 2 is third...  Just change it with the number of the column you want to hide.