Skip to Content
0
Former Member
Dec 25, 2017 at 08:19 AM

Dynamically Generate columns for ui5 table at the click of the checkbox

319 Views

HI Experts,

I am trying to dynamically generate columns once checked in checkbox.Columns are getting added however I am not able to display the label.It has the value undefined.And thus the column are getting generated with out any label. And same with text

var objTable= this.byId("uiTable");
   objTable.bindColumns("selectedModel>/columns/", function(sId, oContext) {
   debugger;
    var oColumnObj = oContext.getObject();
   var  label,text="";
    return new sap.ui.table.Column({
     label :  new sap.m.Label({text: oColumnObj.columKey}),
    });
});

Attachments

undef.png (28.7 kB)