Skip to Content
0

Pagination not working after adding custom column in smart table

Oct 30, 2017 at 11:51 AM

184

avatar image

Hello All,

I had a requirement to enable link on one of the smart table column on click of which it has to open another UI5 application in new tab by passing the column value as an URL parameter. For this I have added a custom column in the smart table with Link and bound it with my URL property of OData service. The complete functionality is working fine now.

However, the pagination stopped working after adding the custom column. The growing property of smart table is set to true in all cases. If I remove the custom column, the pagination works but with this new column, pagination is not working and it loads only top 100 records.

The code snipped of my smart table is"

<smartTable:SmartTable id="sSmartTable"
				growing="true" tableType="ResponsiveTable" showRowCount="true"
				smartFilterId="smartFilterBar" entitySet="ETMIReportSet"
				persistencyKey="com.xxxx.mireport.table" header="Items"
				requestAtLeastFields="MIURL" ignoreFromPersonalisation="MIURL"
				initiallyVisibleFields="MINumber,SystemID,Plant,Program,CreatedOn"
				enableAutoBinding="true" demandPopin="true">
	<Table>
		<columns>
			<Column>
				<customData>
					<core:CustomData key="p13nData"
									value='\{"columnKey": "MINumber", "leadingProperty": "MINumber"}' />
				</customData>
				<Text text="MI" />
			</Column>
		</columns>
		<items>
			<ColumnListItem>
				<cells>
					<Link text="{MINumber}" href="{MIURL}" target="_blank" />
				</cells>
			</ColumnListItem>
		</items>
	</Table>
</smartTable:SmartTable>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Ekansh Saxena Oct 30, 2017 at 04:13 PM
0

Solved this issue. We have to set growing="true" again in the table tag we have given after smartTable as we are kind of redefining the table properties while adding custom column. The final code looks like:

<smartTable:SmartTable id="sSmartTable"
	growing="true" tableType="ResponsiveTable" showRowCount="true"
	smartFilterId="smartFilterBar" entitySet="ETMIReportSet"
	persistencyKey="com.xxxx.mireport.table" header="Items"
	requestAtLeastFields="MIURL" ignoreFromPersonalisation="MIURL"
	initiallyVisibleFields="MINumber,SystemID,Plant,Program,CreatedOn"
	enableAutoBinding="true" demandPopin="true">
	<Table growing="true">
		<columns>
			<Column>
				<customData>
					<core:CustomData key="p13nData"
						value='\{"columnKey": "MINumber", "leadingProperty": "MINumber"}' />
				</customData>
				<Text text="MI" />
			</Column>
		</columns>
		<items>
			<ColumnListItem>
				<cells>
					<Link text="{MINumber}" href="{MIURL}" target="_blank" />
				</cells>
			</ColumnListItem>
		</items>
	</Table>
</smartTable:SmartTable>
Share
10 |10000 characters needed characters left characters exceeded