Link to home
Start Free TrialLog in
Avatar of ukerandi
ukerandiFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Change backgound color using JSON

Hi Expert,
Any one know how to change background  color in the List  using JSON
I have found using rows but not all the background and heading
For example :
{
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "color": "#fff",
    "padding-left": "10px",
    "background-color": {
      "operator": "?",
      "operands": [
        {
          "operator": "==",
          "operands": [
            "@currentField",
            "Green"
          ]
        },

Open in new window

Avatar of Eduard Ghergu
Eduard Ghergu
Flag of Romania image

Hi,

You should deserialize the JSON and use the properties. Assuming that you're going to use Json.NET, you can use the values via a JObject, or, better, via a custom object for all these format properties.
Avatar of ukerandi

ASKER

Thanks .Any code example for List background change.
ASKER CERTIFIED SOLUTION
Avatar of ukerandi
ukerandi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial