0

How can I lock the cols title in a table when i scroll the content? (I want cols title always visible)

p.s. I use sap.m.Table https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.m.Table.html

padibro
  • 1,324
  • 10
  • 56
  • 95
  • Does this answer your question? [sap.m.Table - Vertical Scrolling with Fixed Header](https://stackoverflow.com/questions/37809148/sap-m-table-vertical-scrolling-with-fixed-header) – Boghyon Hoffmann Jul 12 '21 at 16:05

2 Answers2

0

It's currently not possible, and when thinking of it, there (used to be) a good reason too:

Since the sap.m libraries were intended initially for mobile use, controls should not have any scrollbars. And since web applications on a mobile device more often than not require scrolling to display its content, having a control (a table) which needs scrolling itself would disrupt the page-scrolling behavior.

(Just think of a website you display on your mobile device where you need to scroll, and suddenly you're no longer scrolling the page but some inner iframe / control / div element takes over the scrolling, until you reach the end of that control, and your page resumes to scroll down again.)

On desktop applications I agree it would makes sense (and maybe there should be a flag to lock the column headers) but definitely not when displayed on a mobile device.

Qualiture
  • 4,900
  • 7
  • 27
  • 38
-1

In SAP UI5, there exists the attachColumnFreeze method. Perhaps it can be used for freezing columns on a table

attachColumnFreeze

kodyaz
  • 1
  • 1
  • The question was about [sap.m.Table](https://ui5.sap.com/#/api/sap.m.Table). Also [`*ColumnFreeze`](https://ui5.sap.com/#/api/sap.ui.table.Table/methods/setEnableColumnFreeze) is about fixing the entire column instead of just the header. – Boghyon Hoffmann Jan 02 '18 at 13:34