You need to sign in to do that
Don't have an account?
Matyas Csaba
lightning_datatable formatting Column header
Hello helpers
I am developig an applicatin isung lightning:datatable and i would like to add some formatting to the data
I was able to format the data rows and data cells but I am not able to influence how column header look like
see below how it looks like to better understand what I am lookign for. As a minimum I would like to have the column Names bold and in different color like the rest of the table.
Thanks in advance
I am developig an applicatin isung lightning:datatable and i would like to add some formatting to the data
I was able to format the data rows and data cells but I am not able to influence how column header look like
see below how it looks like to better understand what I am lookign for. As a minimum I would like to have the column Names bold and in different color like the rest of the table.
Thanks in advance
Kindly let us know if it helps you and mark as best answer if it helps you so it make proper solution for others
Thanks
sfdcmonkey.com
All Answers
Kindly let us know if it helps you and mark as best answer if it helps you so it make proper solution for others
Thanks
sfdcmonkey.com
sorry to bother you after closing the ticket. do you have ide a why I cna not set the background colr for the datatable column header?
I added background-color: #66ccff; into the code section you suggested
The full styling code lokks like below:
<head>
<style>
#dt1
{
border: 1px solid #ddd;
border-collapse: collapse;
width: 100%;
}
#dt1 td
{
border: 1px solid #ddd;
padding: 8px;
}
#dt1 tr:nth-child(even){background-color: #f2f2f2;}
#dt1 tr:hover {background-color: #ddd;}
#dt1 table thead th
{
color: blue;
font-weight:bold;
background-color: #66ccff;
border: 1px solid #ddd;
}
</style>
</head>
<div id="dt1" >
<lightning:datatable data="{!v.mydataLst}"
......
</lightning:datatable>
</div>
Can you suggest me with how you formatted those cell, rows. They look very good. I want to implement it on my datatable.
Thanks,
Akhil