cancel
Showing results for 
Search instead for 
Did you mean: 

Count table rows after filtering

Former Member
0 Kudos

Hello,

Is there any possibility to count my items in my table after filtering?


That works for me

table.getBinding().getLength();

but not in combination with filtering.

Thanks for your help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Alexander,

You can use this code:

$

    .ajax({

        url : "/url/Set/$count?$filter= Status eq 'test'& $select = aKey",

        success : function(data) {

            numberOfRows = data;

            console.log(numberOfRows + ' rows');

        }

    });

Works fine for me

Kind regards,

RW

koolspy_ultimate
Active Contributor
0 Kudos

Hi Alexander,

you are using filter right?

so get the length of the filtered list.

Check the below code for reference.

     var binding = oTable.getBinding("items");
     binding.filter(aFilters);       
     var len = binding.filter(aFilters);
     alert(len.getLength());

Regards,

Madhumahesh.