0

i habe a sap.ui.table.Table that uses a JON data model. a filter is applied to the table to 'hide' unwanted rows. how can i get a count if how many are left showing? thanks. pas.

Pas
  • 31
  • 4
  • In the linked answer, see the section "Using change event from `sap.ui.model.Binding`". The `onChange` handler should be triggered after filtering the table. There, you can call `.getLength()` from the listBinding object to retrieve the number of items left. Should be also working with a JSONModel. – Boghyon Hoffmann May 17 '20 at 11:00
  • Solved in https://answers.sap.com/answers/13051308/view.html – Boghyon Hoffmann May 18 '20 at 13:45

1 Answers1

-2

Add a updateFinished handler to your table

<Table updateFinished="onTableUpdateFinished" ... >

and then you can get the row number in the controller like this:

onTableUpdateFinished: function (oEvent) {
    var iRows = oEvent.getSource().getBinding("items").getLength();
}
Lumpenstein
  • 1,250
  • 1
  • 10
  • 27