Skip to Content
author's profile photo Former Member
Former Member

Count table rows after filtering

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 25, 2014 at 12:36 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2014 at 01:51 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.