0

I am using sap.m.Table control. Currently, entire page is scroll-able if there are more items.

I want to set only Table's items scroll-able keeping Table header fixed, so that it will always be visible when I'm scrolling.

Also, I want it to be responsive across multiple devices.

I have tried applying following CSS to header:

 thead{
  position: fixed;  
}

and

for div inside which Table is added at runtime by SAPUI5:

#__xmlview0--tab{
  overflow-y: scroll;
}

But it is distorting predefined style for table header.

Here is the link

Ashish Patil
  • 1,624
  • 2
  • 11
  • 27

1 Answers1

1

I've only an ugly solution; however it can work and it seems to be better than defining own CSS classes and properties which may lead to compatibility issues on different browsers.

Create a table, which contains only the header information. After that, you can create a scroll container, and put the body of the table into this scroll container (so you bind the table content but the column headers will be invisible). However this solution may depend on the used Table object.

nistv4n
  • 2,515
  • 2
  • 19
  • 21
  • This will not be feasible solution in my case because I'm using [TablePersoController](https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.m.TablePersoController.html), and [ViewSettingsDialog](https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.m.ViewSettingsDialog.html) to modify table appearance, so columns and table content are dymnamic – Ashish Patil May 23 '16 at 11:20
  • Well, I will try this one, `position: fixed` is not working in any way – Ashish Patil May 23 '16 at 16:01