cancel
Showing results for 
Search instead for 
Did you mean: 

Adding ICON in column header

Former Member
0 Kudos

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")
}));

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

Ger
Advisor
Advisor
0 Kudos

This message was moderated.

Answers (0)