我正在使用智能表。我想了解以下有关此事的信息,
- 如何使某些列默认可见
- 我们如何将自己的列注入到智能表中,比如我们想显示
基于性别(男性或女性)的图标。
- 我们如何设置聚合列,例如名称(名字+姓氏)。
- 如何定义聚合列的排序和过滤。
XML View
<core:View xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" xmlns:smartTable="sap.ui.comp.smarttable" controllerName="smartTable.controller" class="sapUiSizeCompact">
<Page id="page" title="Customer Line Items">
<smartTable:SmartTable entitySet="Patient" tableType="ResponsiveTable" useExportToExcel="true" useVariantManagement="true" useTablePersonalisation="true" header="Line Items" showRowCount="true" persistencyKey="SmartTableAnalytical1" enableAutoBinding="true">
<Table>
<columns>
<Column>
<customData>
<core:CustomData key="p13nData" value='\{"columnKey": "PatientId","leadingProperty": ["LastName", "FirstName"],"sortProperty": "LastName","filterProperty": "LastName"}'/>
</customData>
<Label text="Concatenated Name" />
</Column>
<Column>
<customData>
<core:CustomData key="p13nData" value='\{"columnKey": "Status","leadingProperty": "Status","sortProperty": "Status","filterProperty": "Status"}'/>
</customData>
<Label text="Status" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<ObjectIdentifier title="{LastName} {FirstName}"/>
<Text text="{Status}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</smartTable:SmartTable>
</Page>
</core:View>
控制器
在控制器中,您必须将 odata 模型设置为视图或 smartTable。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)