on ‎2021 Jan 07 8:35 AM
Hello,
I am trying to bind an expanded entity set result to a smart table. Followed the below steps.
I tried giving the navigation property name in tableBindingPath property (as mentioned at link). But that's not working. So I defined custom columns(as mentioned at here and here) and tried binding the navigation property fields names. Also in beforeRebindTable I have mentioned the expand parameter as below
mBindingParams.parameters["expand"] = "HeaderToItemNav";
The second approach works and expanded entity call happens and pulls the data. But only the header set data is binding and not the dependent entity set details.
Please throw some light on how to achieve this.
<smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="HeaderSet">
<smartFilterBar:controlConfiguration>
<smartFilterBar:ControlConfiguration key="Id" visibleInAdvancedArea="true" preventInitialDataFetchInValueHelpDialog="false">
</smartFilterBar:ControlConfiguration>
</smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>
<smartTable:SmartTable id="smartIdid"
entitySet="HeaderSet"
tableType="ResponsiveTable"
useExportToExcel="true"
useTablePersonalisation="true"
showRowCount="true"
showFullScreenButton="false"
enableAutoBinding="true"
showVariantManagement="true"
width="100%" header="Stocks"
beforeRebindTable="onBeforeRebind">
<Table id="dataTable">
<columns>
<Column>
<customData>
<core:CustomData key="p13nData"
value='{"columnKey": "Sdept","leadingProperty": "HeaderToItemNav/Sdept"}'/>
</customData>
<Text text="Department"/>
</Column>
<Column>
<customData>
<core:CustomData key="p13nData"
value='{"columnKey": "Stock","leadingProperty": "HeaderToItemNav/Stock"}'/>
</customData>
<Text text="Stock"/>
</Column>
</columns>
<items>
<ColumnListItem>
<cells >
<Text text="{HeaderToItemNav/Sdept}"/>
</cells>
<cells >
<Text text="{HeaderToItemNav/Stock}"/>
</cells>
</ColumnListItem>
</items>
</Table>
</smartTable:SmartTable>
Controller:
onBeforeRebind: function (oEvent) {
var mBindingParams = oEvent.getParameter("bindingParams");
mBindingParams.parameters["expand"] = "HeaderToItemNav";
},
Request clarification before answering.
Did you get a solution to this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.