cancel
Showing results for 
Search instead for 
Did you mean: 

UI5 - Table scrollbar position after navigation

0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

former_member227918
Active Contributor
0 Kudos

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.

0 Kudos

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.

Answers (0)