Skip to Content
avatar image
Former Member

Not able to retrieve all rows inside SAPUI5 Table.

Hi,

I have table bind to JSON model of 304 records. While the table displays only 100 rows on default I tried adding growing="true" and growingScrollToLoad="true". I was able to retrieve all 304 records or rows by scrolling.

My scenario was to retrieve all table rows inside controller to check a particular combination of columns in a loop but when I use below code

var oModel = this.byId('tableID').getModel("oItems");

var data = oModel.getData().Items;

the length of data is only 20.

Can anyone help me how to retrieve all rows at runtime for this scenario.

Regards,

Karthik.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 30, 2017 at 12:10 AM

    when you create the json model, YOURJSONMODEL.setSizeLimit(9999);

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 30, 2017 at 08:40 AM

    i suggest you create some kind of pagination

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 30, 2017 at 09:50 AM

    Default size of JSON model binding will be 100.

    for extending it more than 100, after attach request completed of Model use method

    Model.setSizeLimit(10000);

    or whatever is size of model as ..

    var length=Model.getData().length;

    Model.setSizeLimit(length);

    hope this will help you.

    :-)



    Add comment
    10|10000 characters needed characters exceeded