Skip to Content

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

Need desired number of cells in a row

Hi,

In the below example:

var oMatrixLayout = new sap.ui.commons.layout.MatrixLayout();

var oRowTemplate = new sap.ui.commons.layout.MatrixLayoutRow({

cells: [

new sap.ui.commons.layout.MatrixLayoutCell({

content: new sap.ui.commons.Label({text:"Name:"})

}),

new sap.ui.commons.layout.MatrixLayoutCell({

content: new sap.ui.commons.TextView({text:"{name}"})

})

]

});

oMatrixLayout.bindAggregation("rows", "/company/contacts", oRowTemplate);

You will always get two cells in the row.

Ho can i add desired number of cells here?

This example will add one label and its value in one row. I need desirable number of labels and their values in one row.

Plz help!

Former Member
Former Member replied

I did this by changing the model dynamically to have the desired number of properties in the object. This looks like the only way to do this.

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