on 08-30-2014 8:19 AM
Dear UI5 experts,
Can anyone suggest how to have a fixed thead (header) with scrollable table cells (content) on sap.m.table control ?
I tried using CSS property - position: fixed for .thead class, but it is getting cluttered also header and cells are being mismatched.
Thank you for your help in advance!
Regards,
Sai.
Dear Sai,
I solved it by work around:
This is code sample:
<Table showNoData="false">
<columns>
<Column minScreenWidth="" demandPopin="false">
<Text text="{i18n>ContractID}" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>ContractType}" />
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
<Text text="{i18n>CompanyCode}" />
</Column>
</columns>
</Table>
<ScrollContainer
horizontal="true"
vertical="true"
focusable="true"
>
<Table
select="handleSelectionChange"
itemPress="handleItemPress"
growing="true"
growingThreshold="100"
growingScrollToLoad="true">
<columns>
<Column minScreenWidth="" demandPopin="false">
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
</Column>
</columns>
</Table>
</ScrollContainer>
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice Hack Farag!
But, only thing is when you do some column re-ordering this might create a problem. Since, column names and items are not associated each other. However, for people who need for only display and doing some logic on items this should work.
Working sample of your logic - Plunker - MobileTblHdrFixed
Regards,
Sai Vellanki.
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.