Topic: Row color on datatables

runnerhub priority asked 2 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 2 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 2 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 2 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.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • 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