Skip to Content

Highlight row in sap ui table

Hi ,

I am using sap ui table and have added the zebra color of the table . And now i am trying to highlight a particular row based on some conditions and making the header fixed.

Note : I am using xml view/ sap.ui.table

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 06 at 05:54 PM

    HI,

    Try this

    //Assuming that there are at least 3 items and that in the XML we have <Table id="idTable" ...
    this.getView().byId("idTable").getItems()[0].setHighlight(sap.ui.core.MessageType.Error);	
    this.getView().byId("idTable").getItems()[1].setHighlight(sap.ui.core.MessageType.Information);
    this.getView().byId("idTable").getItems()[2].setHighlight(sap.ui.core.MessageType.Success);	
    
    Add comment
    10|10000 characters needed characters exceeded