Skip to Content
0

UI5 - Table scrollbar position after navigation

Aug 29, 2017 at 11:32 AM

247

avatar image

Hi,

I have a semantic Detailpage with an sap.ui.table.Treetable control and vertical/Horizontal scrollbars.

User is able to navigate back and forth.

If e.g. the horizontal scollbar position was in the middle and user navihated back and forth the scrollbar is still in the middle and not on the initial left position.

How can I set the scrollbars to inital positions after each navigation?

Thanks!

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

1 Answer

Best Answer
Akhilesh Upadhyay Aug 30, 2017 at 10:51 AM
0

I think refreshing the table on back navigation would be one option,

or you can do it using jquery by setting the scroll position of an element.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Akhilesh,

yes, that solved the problem.

this.getView().byId("tableId").rerender();

on nav back action.

On sap.ui.table.Table this should also work for vertical scrollbar:

oTable.setFirstVisibleRow(1)

but it doesn`t work for TreeTable.

0