Hi all,
Hi want to manage (hide show) columns in a table, which fill out from odata service. I have a json model for the columns visibility and i would like to join both model
var data = { visibleColumns: { firstName: true, lastName: true }, Results: [ // from xsodata { firstName: "XXX", lastName: "AAA" }, { firstName: "YYY", lastName: "BBB" } ]
};Something like that to do:
new sap.ui.table.Column({ visible: "{/visibleColumns/firstName}", label: new sap.ui.commons.Label({ text: "First Name" }), template: new sap.ui.commons.TextView({ text: "{firstName}" })
});
new sap.ui.commons.CheckBox({ text: "First Name", checked: "{/visibleColumns/firstName}"
});Thanks!