cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal scroll with smart table

csimpson
Explorer
0 Kudos

Hello,

I am trying to make a table that needs horizontal scrolling and I am using a smart table and sap.m.table. The problem I am having is everything is not showing on one row (data for each row is about 60 columns) . I need to get everything on one row and you a horizontal scroll bar. Here is my code and I will attach a picture of what the code is doing now that I am trying to change. All the data in the screen shoot is one row of data. Also I need popin that is why I am using table. Any help would be appreciated thank you.

<core:View
	xmlns:core="sap.ui.core" 
	xmlns="sap.m" 
	xmlns:smartFilterBar="sap.ui.comp.smartfilterbar" 
	xmlns:smartTable="sap.ui.comp.smarttable" 
	xmlns:html="http://www.w3.org/1999/xhtml" 
	xmlns:smartForm="sap.ui.comp.smartform" 
	xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1" 
	controllerName="ECSB1.CommLineOvr.controller.Worklist"
	height="100%">


	<Page xmlns="sap.m" id="pageId" title="{i18n>worklistTitle}" floatingFooter="true" showNavButton="true" navButtonPress="onNavBack">
		<smartForm:SmartForm id="smartForm">
		</smartForm:SmartForm>
		<smartFilterBar:SmartFilterBar id="smartFilterBar" entitySet="CommOverrideView" >
			<smartFilterBar:controlConfiguration>
			</smartFilterBar:controlConfiguration>
		</smartFilterBar:SmartFilterBar>
		<smartTable:SmartTable id="SmartTableID" entitySet="CommOverrideView" smartFilterId="smartFilterBar" useExportToExcel="true"
			tableType="ResponsiveTable" beforeExport="onBeforeExport" useVariantManagement="true" useTablePersonalisation="true" header="Line Items" 
			showRowCount="true" demandPopin="true" class="sapUiResponsiveContentPadding" enableAutoBinding="true"> <!--tableType="ResponsiveTable" -->
			<smartTable:customToolbar>
				<OverflowToolbar design="Transparent">
					<ToolbarSpacer/>
					<Button text="Add" press="action" app:wiring="\{'press':\{'navigation':\{'routeName':'Add'\}\}\}"/>
				</OverflowToolbar>
			</smartTable:customToolbar>
			<smartTable:layoutData>
				<FlexItemData growFactor="1" baseSize="0%" />
			</smartTable:layoutData>
			<ScrollContainer horizontal="true">
				<Table id="TableID" growing="true" growingScrollToLoad="true" growingThreshold="20" selectionChange="onPress" >
					<!--mode="SingleSelectMaster">-->
				</Table>
			</ScrollContainer>
			
		</smartTable:SmartTable>
	</Page>
</core:View>
View Entire Topic
junwu
Active Contributor

you have to go with ui.table to have scrollbar

m.table won't give you that.

csimpson
Explorer
0 Kudos

If I go with ui.table don't I lose popin support?

junwu
Active Contributor
0 Kudos

sap gives you popin to avoid scrollbar.......

what are you think???

csimpson
Explorer
0 Kudos

according to this post from sapui5. There is no popin support for ui.table.

https://sapui5.hana.ondemand.com/docs/topics/148892ff9aea4a18b912829791e38f3e.html

junwu
Active Contributor
0 Kudos

I was saying m.table gives you popin to avoid scrollbar......

csimpson
Explorer
0 Kudos

oh okay I see what your saying. Is there anyway to have both? I have been sreaching but can not find anything so I am guessing probably not?