Hi, i have a list, let's say it is similar to the list in this post: SAPwebIDE MD/MMD templates unpleasant differences (bound List/Table doesn't work properly in MMD Detail view, but works OK in MD Detail view)
<List xmlns="sap.m" id="idList" inset="false" visible="true" headerText="" headerDesign="Standard" footerText="" mode="None" width="100%" includeItemInSelection="false" showUnread="false" noDataText="" showNoData="true" enableBusyIndicator="true" modeAnimationOn="true" showSeparators="All" swipeDirection="Both" growing="false" growingThreshold="20" growingTriggerText="" growingScrollToLoad="false" rememberSelections="true" backgroundDesign="Solid" itemPress="" items="{path:'Order_Details'}" > <items> <ColumnListItem type="Navigation" counter="0"> <cells> <Text text="{OrderID}"/> <ObjectIdentifier title="{ProductID}" text="{UnitPrice}"> </ObjectIdentifier> </cells> </ColumnListItem> </items> <columns> <Column minScreenWidth="tablet"> <header> <Text text="OrderID" maxLines="0"/> </header> </Column> <Column minScreenWidth="tablet"> <header> <Text text="ProductID / UnitPrice" maxLines="0"/> </header> </Column> </columns></List>
Looking like that:
How can i conditionally change background color (or style) of list item (row or cell, whatever)?
What i have already tried:
- Using Native HTML in XML Views: SAPUI5 SDK - Demo Kit
- Does'nt work, native HTML is not allowed as ColumnListItem child =(
- Using formatter, to get reference to the parent control, like that: title="{path : 'OrderID', formatter:'.onFormat'}":SAPUI5 table - changing font size and font color conditionally (in SAP) - how to do it right? - Stack Overflow
- Does'nt work with XMLview: you cannot get reference to the formatting controls, "this" contains nothing useful.
What else should i try?
Best Regards, Ilia.