Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get Table Rows Count - Bind Aggregation

Hi,

I want to get table row count, there is no issue in binding the data to table. But I couldn't able to get the row count.

                                oTable.bindAggregation("items", {

                                                                path: "/VbakSet",

                                                                template: oItemTemplate,

                                                                filters: filters

                                                });

                                   //Logic to get the row count

var tab = this.getView().byId("idVbakTable");

                                                //get binding path of table items

                                                var bindingPath = tab.getBinding("items").sPath;

                                                //get data model of table

                                                var model = tab.getModel();

                                                //get bind data

                                                var data = model.getProperty(bindingPath);

                                                //get total rows number

var rowCount = data.length; “ Here I am getting Error – Not able to read the length

                                                console.log(" >> ", rowCount);

                                                alert(rowCount);

                                },

I have tried with various methods, but not able to get the simple row count.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question