function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pratik RodePratik Rode 

How to change the color of text in the column header in Lightning Data table.

Column text color change
CharuDuttCharuDutt

Hii Pratik 

Try Below Link
Datatable Styling (https://www.salesforcetroop.com/datatable_styling_in_lwc)

Please Mark It As Best Answer If It Helps
Thank You!

Suraj Tripathi 47Suraj Tripathi 47
Hi Pratik,

 
{label: ‘Diet Type’, fieldName: ‘diet’, type: ‘text’, cellAttributes: { class: { fieldName: ‘dietCSSClass’ }}},

{diet : ‘Vegeterian’, dietCSSClass : ‘diet-veg’} .

diet-veg
{ color: black; }


 
 If you find your Solution then mark this as the best answer


  Thank you!


  Regards,
  Suraj Tripathi 
Pratik RodePratik Rode
We want to change the color of the text, present in the column header, does not want to fill entire column 
 
Jayeshkumar ParmarJayeshkumar Parmar

Hello Pratik Rode,

 


Try Below Link

 

https://salesforce.stackexchange.com/questions/224287/how-to-apply-css-to-headers-of-a-lightningdatatable/224294

 

Please Mark It As Best Answer If It Helps
Thank You.

Kate BallsKate Balls
I was also searching anwers for queries of my assignments then my friend refers me writing assignment service (https://perfectessaywriting.com/assignment-writing-service). It will helps you alot in solving your difficulties and problems.