Topic: Row color on datatables
runnerhub priority asked 6 months ago
Expected behavior How to change color of full row on datatables, I con only change a cell color, not even the cell has access to full data.
Actual behavior I can only change a specific cell color
Resources (screenshots, code snippets etc.)
Grzegorz Bujański staff answered 6 months ago
Check out this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/6099897#js-tab-view I have prepared an example of how you can achieve this using the format
option.
Grzegorz Bujański staff answered 6 months ago
If I understand correctly, you want to change the styles of the entire row if the cell value in that row has a specific value?
runnerhub priority commented 6 months ago
Yes, I can change one cell only, the function that is on documentation:
const formatCell = (cell, value) => {
so I have access just to the value of that specific cell, not the entire row data.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 7.2.0
- Device: Mac
- Browser: Chrome
- OS: MacOs
- Provided sample code: No
- Provided link: No