Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8545

How do I obtain the number of rows/entries in a UI5 Table after filtering programmatically?

$
0
0

Hello,

 

I built this little report where I can click on an arc from this Donut chart (which represents supervisors) and the table underneath displays the chosen supervisor's employees using a filter.

What I need now is to determine the number of entries/rows that are currently being displayed in the table (including those that go over the visible row count).

 

The json data is in one model that I attach to the table. And when an arc of the Donut is selected, I add a filter on the table :

 

Donut Chart:
selectData: function(e) {

     ...

     aFilter.push( new sap.ui.model.Filter("SUPER_PIN", sap.ui.model.FilterOperator.EQ, super_pin));

     oTable2.bindRows({

       path: "/ROOT/DETAIL",

       sorter: new sap.ui.model.Sorter("EMPL_PIN", false),

       filters: aFilter

       });

 

     //DETERMINE oTable2 NEW ROW COUNT

     ...

}

 

oTable2.setModel(oModelBankedTime);

oTable2.bindRows("/ROOT/DETAIL");

Table row count.jpg

I've been trying to use every method from the sap.ui.table.Table API but cannot get this information.

 

Also, none of the Table events get triggered when I programmatically apply the filter (using the code shown above), so I can't get an event context there.

 

Any ideas?

 

Many thanks!

Scott


Viewing all articles
Browse latest Browse all 8545

Trending Articles