cancel
Showing results for 
Search instead for 
Did you mean: 

How to Reset Paginator after binding new data in Table (sap.ui.table.Table )

Former Member
0 Kudos

Hi Guys,

I am facing some issue with Table Paginator.

I have Dropdown Box, On change of DropDown value I am binding new data in Table (sap.ui.table.Table).

but the Paginator of table showing me old selected value.

How to reset that Paginator (default to 1) while binding new Data in Table ?

Regards,

Sumit.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Sumit,

How about oPaginator.setCurrentPage(1) as described in the API Documentation here:

https://sapui5.netweaver.ondemand.com/#docs/api/symbols/sap.ui.commons.Paginator.html#setCurrentPage

Regards,

Florian

Former Member
0 Kudos

Hi Florian,

I tried the setCurrentPage also before appending new data in Table.

But still peginator showing old value as selected.

Regards,

Sumit

Former Member
0 Kudos

Answers (1)

Answers (1)

saivellanki
Active Contributor
0 Kudos

Hi Sumit,

Yes .setCurrentPage(1) doesn't seem to work

As an alternative, you could try this approach: JS Bin - Collaborative JavaScript Debugging

Navigate to any page in the paginator and click on the button placed underneath the table. On button press it will navigate to first page.


Regards,

Sai Vellanki.

former_member182862
Active Contributor
0 Kudos

Hi Sai

I have modified your JSBin, JS Bin - Collaborative JavaScript Debugging

Essentially, we need to set the setFirstVisibleRow.

Destroying and recreating the table is to much. IMO.

Thanks

-D