Skip to Content
0

Highlight row in sap ui table

Nov 08, 2017 at 09:08 AM

142

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 06 at 05:54 PM
0

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);	
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thans Iftah for a quick reply. But i assume this can be used only if ur ui version is above 1.48.

I have used the css and all but still its not working .

0

Please post screenshots and code snippets. Even better, have a JS fiddle/ JS bin or some running example - like here (also see section 12 there) .

0