So, if a cell value of a certain column is below 1000, you're assigning a new CSS class "hide" to the row.
This class should work automatically, hiding the rows that are below 1000, but if it doesn't work straight away, you can go to wpDataTables settings/Custom JS and CSS/Custom CSS field, and add this:
Please note, though, that on pages where you have rows with values below 1000, they will only be hidden from view, but they will still be present on the page. So, if you have 10 rows on the first page of the table, and there are 9 rows with values below 1000, you will only see 1 row on the first page.
If you have a lot of these entries, you may want to consider increasing the number of rows that exist on the page. If the table exceeds 2.000 rows, choosing the option "All" is not recommended, because the page loading time will increase, and it can also break due to the amount of data.
Hello
I wonder if it possible to hide rows if the value in a column is zero or empty?
Thanks!
Hello Dave
You can try adding a custom row CSS class if the column meets a certain condition, by using conditional formatting.
The custom Class you add in the rule can be defined in wpDataTables settings/Custom JS and CSS/Custom CSS field.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi can you show me an example of the CSS class which hides full row if - for example the value of the cell in column Sales if below 1000
Sure thing, Dave.
So, if a cell value of a certain column is below 1000, you're assigning a new CSS class "hide" to the row.
This class should work automatically, hiding the rows that are below 1000, but if it doesn't work straight away, you can go to wpDataTables settings/Custom JS and CSS/Custom CSS field, and add this:
Please note, though, that on pages where you have rows with values below 1000, they will only be hidden from view, but they will still be present on the page. So, if you have 10 rows on the first page of the table, and there are 9 rows with values below 1000, you will only see 1 row on the first page.
If you have a lot of these entries, you may want to consider increasing the number of rows that exist on the page. If the table exceeds 2.000 rows, choosing the option "All" is not recommended, because the page loading time will increase, and it can also break due to the amount of data.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables