I have a XML view with a smart table binded to an oData service. For this smart table I want to add a custom column for erdat
as described in the SAPUI5 sample.
Code from the XML view:
<smartTable:SmartTable id="smartTable0" entitySet="<my_entity_set>" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTable"
tableType="ResponsiveTable" useExportToExcel="true" useTablePersonalisation="true" showRowCount="true" showFullScreenButton="true"
class="sapUiResponsiveContentPadding" exportType="UI5Client" demandPopin="true">
<smartTable:layoutData>
<FlexItemData growFactor="1" baseSize="0%"/>
</smartTable:layoutData>
<Table alternateRowColors="true" fixedLayout="false" growing="true" growingScrollToLoad="true" growingThreshold="20">
<columns>
<Column width="200px" hAlign="Begin">
<customData>
<core:CustomData key="p13nData" value="\{'columnKey': 'erdat', 'leadingProperty': 'erdat', 'columnIndex': '0'}"/>
</customData>
<Text text="Erdat"/>
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{path: 'erdat'}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</smartTable:SmartTable>
Without the custom column the smart table displays the data as expected. When I add the custom column I get an error:
Uncaught (in promise) The table instance contains some columns for which a columnKey is provided, some for which a columnKey is not provided.
The table shows the column headers only, but no data. I have tried several combinations with and without columnKey
or leadingProperty
but without success. The field erdat
is included in the oData service.
Web search didn't provide a solution for me. Any help would be appreciated.