on 08-26-2015 6:17 AM
Hi,
I am showing a table binded with oData model.
I want to show an ICON on column header along with description.
How can i Do that?
I am using below code to create and add columns
var oTable = new sap.ui.table.Table({ | ||||||||||
id: "tableId", | ||||||||||
width : "1550px", | ||||||||||
columnHeaderHeight : 1, | ||||||||||
selectionBehavior:sap.ui.table.SelectionBehavior.Row, | ||||||||||
visibleRowCount : 20, | ||||||||||
}); | ||||||||||
oTable.addColumn(new sap.ui.table.Column({ | ||||||||||
name : "RequestId", | ||||||||||
width : "100px", | ||||||||||
filterProperty : "RequestId", | ||||||||||
label : "Request Id", | ||||||||||
template : new sap.ui.commons.TextField() | ||||||||||
.bindProperty("value", "RequestId") | ||||||||||
})); |
Just add
sap.ui.table.Column({ | |||||||
name : "RequestId", | |||||||
width : "100px", | |||||||
filterProperty : "RequestId", | |||||||
label : new sap.ui.commons.Label({text : "RequestId",icon : "sap-icon://taxi"}); | |||||||
template : new sap.ui.commons.TextField() | |||||||
.bindProperty("value", "RequestId") |
}));
sap.ui.commons.Label has a icon property with it
JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.commons.Label
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.