Skip to Content

How to set hightlight to a sap.ui.table.Row

Hi experts, now I'm developing an application with a sap.ui.table.Table in it. From the Demo I know I could set highlight to the rows with the aggregation rowSettingsTemplate in the table.

But this way is operating on the whole table. Is there anyway to operate on a specific sap.ui.table.Row to set highlight to it? Thank you so much!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 28, 2017 at 03:43 AM

    There are many ways you can achieve it, depending on how you are getting your data.

    You can use formatter functions if you are getting data from back end. In the formatter functions, you could specify the condition for the row you want highlighted.

    You can use the addStyleClass, for the specific row :

    <row>.addStyleClass(myClass);

    Or, based on some event if you want to highlight the colour , you can add an event listener to the row and in the controller write the logic for it.

    Hope this helps,

    Regards

    Add comment
    10|10000 characters needed characters exceeded