on 2018 Nov 29 6:26 AM
Hey can anyone tell me how to group data in sap.ui.comp.smarttable ?
<smarttable:SmartTable id="fileTableId" header="{i18n>tableTitle}" useTablePersonalisation="true" entitySet="SourceData"
enableAutoBinding="false" beforeRebindTable="onRebindSourceTable" tableType="ResponsiveTable" showRowCount="true" demandPopin="false"
class="sapUiSmallMarginBeginEnd" ignoreFromPersonalisation="BusinessUnit"
customData:p13nDialogSettings="{group:{visible:false},filter:{visible:false}}"
requestAtLeastFields="Id,Name,Address "
initiallyVisibleFields=" Id,Name,Address " useExportToExcel="false">
<smarttable:customToolbar>
<OverflowToolbar design="Transparent">
<ToolbarSpacer/>
<Button id="idDownloadTemp" text="{i18n>downloadBut}" tooltip="{i18n>downloadBut}" press="handleDownloadPress"/>
<Button id="idUploadExcel" text="{i18n>uploadExcelBut}" tooltip="{i18n>uploadExcelBut}" press="onUploadOpen"/>
<Button id="idDeleteFile" icon="sap-icon://delete" tooltip="{i18n>deleteFile}" press="onDeleteFile" enabled="false"/>
<Button id="idRefresh" tooltip="{i18n>refresh}" press="onReload" icon="sap-icon://refresh"/>
</OverflowToolbar>
</smarttable:customToolbar>
<Table id="table" growing="true" growingScrollToLoad="true" updateFinished="onUpdateFinished" mode="MultiSelect"
selectionChange="onTableSelectionChange">
Hi Nikesh T T,
In this scenario as you have your own table and I guess you might have defined the columns as well. "mergeDuplicates="true"
<smarttable:SmartTable><Tableid="table" growing="true" growingScrollToLoad="true" updateFinished="onUpdateFinished" mode="MultiSelect"selectionChange="onTableSelectionChange"><columns> <Column mergeDuplicates="true">
<Label design="Bold" text="Item"/>
</Column></columns>
<item><ColumnListItem vAlign="Middle"> <cells>
<Text text="{Details}"/> </cells></ColumnListItem> </items>
<Table></smarttable:SmartTable
Thanks and Regards,
Bibhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikesh T T
You have to create an annotation file and provide sort and groupby annotations to your entityset. For more info, check this blog:
https://blogs.sap.com/2018/01/11/fiori-elements-list-report-sorting-grouping-and-table-types/
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nikeshtt thank you for very good Blog. Unfortunately still it is not working for me after adding GroupBy to Annotations.
<Annotation Term="UI.PresentationVariant">
<Record Type="UI.PresentationVariantType">
<PropertyValue Property="GroupBy">
<Collection>
<PropertyPath>Category</PropertyPath>
</Collection>
</PropertyValue>
GroupBy
is only evaluated for the AnalyticalTable
control.User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.