I want to add a specific CSS class to my cells. When the value contains a ^, the class fastest-lap should be added. Since I style the cell through this CSS class, I no longer need the ^ char in my display value and want to remove this character. Is it possible to set the cell's content using a regular expression or is there an event I can handle, after the whole table is completely rendered, so I can modify my table using custom Javascript?
Can you please tell me did you try to use our conditional formatting. You can take a look at our documentation about conditional formating so I hope you can find some useful hints. Let me know the result.
yes, I tried. But this only gives me the opportunity to bind a specific CSS class to my cell. I could replace the whole cell content, which wouldn't help, because I want to keep the 25 and remove the ^ (original content: 25^) after adding the CSS class. So I need some kind of regular expression at that point or at least something like if cell contains value ^ than extract everything before ^.
Unfortunately this functionality is not available without some customization.
If you are interested please give us detailed instructions and we can send you quote for this service. I can give you some guide how it should be done so maybe you can implement it by yourself. If you are skillful with JS you can use hooks to alter table content on php side. Take a look at your documentation for developers about -filters and hooks so maybe you can find something useful.
thanks for your reply! Didn't have so much time the last couple of weeks, but now I hope to proceed with this :) Is there any javascript event I can bind a handler to, after the table is completely rendered? That would be much easier than writing server-side code.
wpdatatables_after_table( $table_id ) This action is called after the table is rendered on the page. $table_id is the table ID from wp_wpdatatables table.
Also please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code. It would not be fair to other customers that have similar requests to write a code here. As you're developing some custom solution if you need our assistance we can offer you our paid customization service.
thanks for your reply! I figured it out now how to implement this function using the addOnDrawCallback method. Thanks for your effort! This plugin is worth every penny and I don't even use half of it's functions yet :)
Hey guys,
I want to add a specific CSS class to my cells. When the value contains a ^, the class fastest-lap should be added. Since I style the cell through this CSS class, I no longer need the ^ char in my display value and want to remove this character. Is it possible to set the cell's content using a regular expression or is there an event I can handle, after the whole table is completely rendered, so I can modify my table using custom Javascript?
Best regards
Sven Kannenberg
Hi Sven Kannenberg,
Thank you for your purchase.
Can you please tell me did you try to use our conditional formatting.
You can take a look at our documentation about conditional formating so I hope you can find some useful hints.
Let me know the result.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Bogdan,
yes, I tried. But this only gives me the opportunity to bind a specific CSS class to my cell. I could replace the whole cell content, which wouldn't help, because I want to keep the 25 and remove the ^ (original content: 25^) after adding the CSS class. So I need some kind of regular expression at that point or at least something like if cell contains value ^ than extract everything before ^.
Best regards
Sven
Hi Sven,
Unfortunately this functionality is not available without some customization.
If you are interested please give us detailed instructions and we can send you quote for this service.
I can give you some guide how it should be done so maybe you can implement it by yourself.
If you are skillful with JS you can use hooks to alter table content on php side.
Take a look at your documentation for developers about -filters and hooks so maybe you can find something useful.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Bogdan,
thanks for your reply! Didn't have so much time the last couple of weeks, but now I hope to proceed with this :) Is there any javascript event I can bind a handler to, after the table is completely rendered? That would be much easier than writing server-side code.
Best regards
Sven
Hi Sven
I can suggest you to take a look at this hook
wpdatatables_after_table( $table_id )
This action is called after the table is rendered on the page. $table_id is the table ID from wp_wpdatatables table.
Also please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code.
It would not be fair to other customers that have similar requests to write a code here.
As you're developing some custom solution if you need our assistance we can offer you our paid customization service.
Thank you for understanding.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Bogdan,
thanks for your reply! I figured it out now how to implement this function using the addOnDrawCallback method. Thanks for your effort! This plugin is worth every penny and I don't even use half of it's functions yet :)
Best regards
Sven
Hi Sven,
Glad that you found the solution and implement the function, good job.
We are very happy to hear that you are satisfied with our product.
If you like our plugin and support please rate our plugin at CodeCanyon on this link. It means a lot to us. Thanks.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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