Skip to Content
0

Not able to load all data in sap.m.CombBox from oDataModel

Dec 19, 2016 at 06:19 AM

47

avatar image

Hi,

I am using sap.m.ComboBox in our application. And to fetch the countries name in it
use oData Model. It is fetching the data (Country Name) in the control but not all countries items.(sap.m.ComboBox shows only 100 countries).

And I try to see the data which is attached to the sap.m.CoboBox control in console

by using this code sap.ui.getCore().byId("countrolName").getModel().oData

it is also showing the 100 countries. (But in database shows 200 countires)

Please suggest something to show all the items(data) in sap.m.ComboBox.

Thanks & Regards
Somdutt Sharma

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sudheer Kumar Akkalapotu Dec 22, 2016 at 05:59 PM
0

Hi Somdutt,

The default size limit of the model in combobox is 100.

You need to change the sizeLimit of the model explicitly before setting the model to the control.

oModel.setSizeLimit(250); // if you are directly setting odata model use the limit based on your data

oModel.setSizeLimit(oData.results.length); // if you are using json model
Share
10 |10000 characters needed characters left characters exceeded
Sudheer Kumar Akkalapotu Dec 22, 2016 at 05:59 PM
0

Hi Somdutt,

The default size limit of the model in combobox is 100.

You need to change the sizeLimit of the model explicitly before setting the model to the control.

oModel.setSizeLimit(250); // if you are directly setting odata model use the limit based on your data

oModel.setSizeLimit(oData.results.length); // if you are using json model
Share
10 |10000 characters needed characters left characters exceeded