Adding CustomData to UI5 TreeTable Row?


I am trying to colorize my tablerows using customdata but i just dont understand how to do it.
In the code below u can see me trying to add customdata, it works but its not added to the tablerow. Instead, the one inside the text elements obviously adds it to the text, the second one only adds it to one header row above my column. Any helpers?

<k:TreeTable
   id="treeTable"
   selectionMode="Single"
   enableColumnReordering="false"
   visibleRowCountMode="Auto"
>
<k:columns>
     <k:Column label="" id="test">
          <k:template>
               <Text text="{Description}" wrapping="false" class="myListItemClass">
                   <customData>
                        <core:CustomData key="mydata" value="{path: 'DrillState', formatter: '.formatter.colorString'}" writeToDom="true" />
                   </customData>
               </Text>
           </k:template>
       <k:customData>
             <core:CustomData key="mydata" value="{path: 'DrillState', formatter: '.formatter.colorString'}" writeToDom="true" />
       </k:customData>
   </k:Column>
</k:columns>

</k:TreeTable>

Source: CSS – Stack Overflow

September 9, 2021
Category : News
Tags: css | sapui5 | treetable

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.