title: How to change color of sap.ui.table.Table row based on the status value?
body: <p>I'd like to change the row color of a grid table (<code>sap.ui.table.Table</code>) based on status value. I followed the <a href="https://blogs.sap.com/2017/04/03/sap-ui5-table-row-color-change-based-on-status" rel="nofollow noreferrer">this blog post</a> and tried but I'm not able to achieve it.</p>
  <p>Could any one provide the suggestion how to achieve it?</p>
  <p>Below is the xml code:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;table:Table id=&quot;Table&quot; rows=&quot;{Dataset&gt;/}&quot; selectionMode=&quot;None&quot;&gt;
    &lt;table:columns&gt;
      &lt;!-- ... --&gt;
      &lt;table:Column&gt;
        &lt;Text text=&quot;Status&quot;/&gt;
          &lt;table:customData&gt;
            &lt;core:CustomData key=&quot;mydata&quot; value=&quot;{DataSet&gt;Status}&quot; writeToDom=&quot;true&quot; /&gt;
          &lt;/table:customData&gt;
        &lt;/Text&gt;
        &lt;table:template&gt;
          &lt;Text text=&quot;{DataSet&gt;Status}&quot; wrapping=&quot;false&quot;/&gt;
        &lt;/table:template&gt;
      &lt;/table:Column&gt;
    &lt;/table:columns&gt;
  &lt;/table:Table&gt;
  </code></pre>
  <p>CSS file:</p>
  <pre class="lang-css prettyprint-override"><code>tr[data-mydata=&quot;Success&quot;] {
    background: #ff3333 !important;
  }
  </code></pre>