cancel
Showing results for 
Search instead for 
Did you mean: 

Pagination in sap.m.table by using the growing and growingThreshold properties

0 Kudos

Hi All,

I am trying to do the pagination in the sap.m.table control by enabling the growing and giving the growingThreshold as 100. But while loading the oData, the entire data is loaded at the same time, and it just displays the top 100 values. then on clicking on the "More" it does not trigger the oData. I want to know if there is any event or trigger function to control the click on the "More" button. Please help in this issue

Thanks,

Aashwin Jain

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

We're using the growing property on a table, thus the pagination is handled by the control it self.

However, if we want to update some item in the table, in order to get those details reflected, we're refreshing the model, which is performance intensive.

Is there any way we can update the UI only without creating any UI inconsistencies?

Another question is that, is there any way to disbale the checkbox on the table items, based on some property from the backend. we tried to use editable property, but it hides the entire row.

We need to disable the checkbox on the rows for particular items?

Also, I need to know any resources on the mobile library where I can find the CSS related documentaion.

Like we need to create a icon + text structure, which controls should be ideal to use? I have used

<HBox><Icon src="abc"/><Text text="abc"/></Hbox>, but it creates alignment issues. Any ideas here?

Thanks!

Aamir

Former Member
0 Kudos

Hi,

I'm having a similar issue like you at the moment.

I set the growing attribute of my sap.m.Table to true, but I don't see the "More"-button at the end of the table which you mentioned.

I wondered if you found a solution to your problem and if you could share it with me?

EDIT: Ok so I just found out that the button is present, but it is not displayed (via CSS-Style "display:None").

I made it visible manually and now have the same problem as you, pressing the "More"-Button doesn't do anything.

Any idea how one could fix this?

Thanks in advance,

Felix

0 Kudos

Hi Felix,

At first, I would like to ask did you set the growingThreshold value for the table??

If yes, how much is it?

if the growing threshold value is more than the number of rows present in the oData, then the "More" button will not be displayed.

Actually in my case, pressing the More button gave me more data, but it was not making the oData call for back-end. For that I made some changes in oData call.

I hope it helps.

Regards,

Aashwin Jain

Former Member
0 Kudos

Hi Aashwin,

thanks for your help!

I fixed my issue, now it works perfectly.

The reason it was not working properly is because my OData-Model's CountMode was set to None...

(oModel.setDefaultCountMode(sap.ui.model.odata.CountMode.None)).

I changed that and now it works.

Regards,

Felix

jmoors
Active Contributor
0 Kudos

Hi,

Have you tried setting the model size, by default it's 100. i.e.


oModel.setSizeLimit(1000);

https://sapui5.hana.ondemand.com/sdk/docs/api/symbols/sap.ui.model.Model.html#setSizeLimit

0 Kudos

Actually it is loading all the records that are coming from the backend causing performance issues. I want to achieve client side paging using $top and $skip constructs of odata. The odata binding is done in following way:

var oModel = new sap.ui.model.json.JSONModel();

var oDataModel = this.oApplicationFacade.getODataModel();

.

.

.

.

oDataModel.read(arunOdataPath+ofilterPath,null,null,false,function(oData,oResponse){

   oModel.setData(oData);

  });

Now I want to introduce paging with some event like "More" button click or scrolling. How should this be achieved?