I have a small issue. I want to add two controls(TextView and Button) in a single table column. I have tried concatenation, array type to pass two controls into template but failed. Anyone please help me to solve this.
this is my sample table.
You can create more complex column templates like this:
var nameColumnTemplate = new sap.ui.layout.HorizontalLayout({
content : [new sap.ui.commons.Button({text : "Click"}), new sap.ui.commons.TextView({text : "{lastName}"})]
});
tbl.addColumn(new sap.ui.table.Column({
label: "Last Name",
template: nameColumnTemplate
}));
JSBin example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With