cancel
Showing results for 
Search instead for 
Did you mean: 

getContexts fetches only 100 contexts

Former Member
0 Kudos

I am trying to fetch rows from the oTable and Model. I am using getContexts method but it return only 100 records. I dont know the way out.

var oData={

                                        allocation:[],                              // final data

                                        practice:[],                              // dynamic

                                        location:[],                              // static

                                        grade:[],                                        // static

                                        type:[],                                        // static

                                        customer:[],                              // dynamic

                                        skill:[],                                        // dynamic

                                        onsite:[],                                        // dynamic

                                        account:[],                                        // dynamic

                                        visaStatus:[]                              // static

                    }

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

              sap.ui.getCore().setModel(oModel_tab);

aFilters contains Filters on it...

var oTable = new sap.ui.table.Table({

                         visibleRowCount: 50,

                   firstVisibleRow: 3,

                        });

oTable.getBinding('rows').filter(aFilters);

This line give proper filtering data

oTable.getBinding('rows').filter(aFilters).getContexts();

whereas the get Contexts method gives only at max 100 contexts.

Accepted Solutions (0)

Answers (3)

Answers (3)

smarchesini
Active Contributor

Hi,
thank to my collegue we FIND THE SOLUTION (if oTable is already filter):

oTable.getBinding('rows').getContexts(0, 150); //150 is the number of the rows you want 
kammaje_cis
Active Contributor
0 Kudos

Hi Dhaval,

By default table has a threshold of 100 rows.

You can use oTable.setThreshold(200); so that it will fetch 200 records.

Thanks

Krishna

Former Member
0 Kudos

Hi Dhaval,

You use this :

oTable.getBinding('rows').filter(aFilters).getContexts('101');

This will increase the size of getContexts method.

Regards,

Nandan