cancel
Showing results for 
Search instead for 
Did you mean: 

Need desired number of cells in a row

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

karthikarjun
Active Contributor
0 Kudos

Hi Amjad,

Will this help? http://jsbin.com/saluku/edit?html,css,js,output

Thanks,

Karthik A

Former Member
0 Kudos

Any one?

agentry_src
Active Contributor
0 Kudos

Please read the following blog, especially section 5.

While bumping is not often considered something to cause deletion or Alerting the Moderator, it is considered rude when it has been less than an hour since the original thread was posted.  It does not matter how desperate you may be to find a solution.

Regards, Mike (Moderator)

SAP Technology RIG