Skip to Content
avatar image
Former Member

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 27, 2015 at 06:13 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2015 at 12:53 PM

    Any one?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2015 at 01:29 PM

    Hi Amjad,

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

    Thanks,

    Karthik A

    Add comment
    10|10000 characters needed characters exceeded