Skip to Content

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

How to get column binding in JavaScript


I try to get the binding information of columns of a sap.m.table in JavaScript but I can´t figure out how to do that.

This is my table definition (shortened example):

<Table id="tblSystemSelection" inset="false" items="{/Systems}" mode="SingleSelectMaster" width="auto">



  <Label text="Column A"/>



  <Label text="Column B"/>





  <Text text="{MyColumnA}"/>

  <Text text="{MyColumnB}"/>




Now, in JavaScript I would like to get the binding paths "MyColumnA" and "MyColumnB".

I can get the table object and the binding info for the "items" collection:

var oTable = sap.ui.getCore().byId("tblSystemSelection");

var oItemsBinding = oTable.getBinding("items");

I can also get the cells of the item template:


But nowhere I can find the binding path information "MyColumnA" and "MyColumnB".

Does anyone know how to get them?

Thanks and best regards,



You can try something like this.

var aBindingInfos = oTable.getBindingInfo('items').template.getCells().map(function(oCell){

     return oCell.getBindingInfo('text').parts[0].path;


console.log(aBindingInfos) // ["MyColumnA","MyColumnB"]

1 View this answer in context

Helpful Answer

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