Hi,
columns:[] in sap.m.List is an aggregation, that only defines the column property. i.e., column header and footer etc.,
The actual content of list needs to be passed to items inside sap.m.List as ColumnListItem->Cells
Have changed your code as below
var col = new sap.m.Column({
hAlign : "Left",
header : new sap.m.Label({text : "Name"}) ,
});
var lis = new sap.m.List({
headerText : "List",
items : [
new sap.m.ColumnListItem({ // first row
type: "Navigation",
cells : [
new sap.m.Label({
text : "John"
}),
]
}),
],
visible : true,
//width : "1000px",
columns : [col]
});
adn the output for the above code is:
Please refer Documentation/AdvancedTopics/Mobile/TableFeatures – SAPUI5 Wiki (TIP CORE User Interface) for complete reference of Tables/List
Regards,
Meganadhan S