Forum Discussion
Shinhidora
Dec 23, 2020Copper Contributor
SharePoint list Alternating column formatting
Hello everyone, I was wondering if it is possible to alternate the background color of colums using JSON formatting on a Sharepoint List view? I'm aware of the conditional formatting and sett...
- Dec 23, 2020
Shinhidora Nope. If you have formatting you want applied to each column, you would need to add the formatter JSON to each column.
ganeshsanap
Dec 23, 2020MVP
I don't think it is possible to set background-color to alternate columns.
However, if you are looking for setting background color to alternate rows then you can do it like below:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if(@rowIndex%2==0,'ms-bgColor-themeLight','')"
}
Reference: Alternate Row Formatting based on Modulus
Please click Mark as Best Response if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.