Adding CustomData to UI5 TreeTable Row?

714 views Asked by At

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>

0

There are 0 answers