Advanced SAPUI5 Part-30: the Grid Table Advanced Features

We gained knowledge of row actions as well as the freezing of columns and rows. I’ll go over the grid table’s characteristics below in this blog article.

  • row highlighter
  • swap out the row colors

Highlighter for Rows

A row highlighter is a vertical color band that is used to indicate a row’s start with a certain color, such as red for an error, yellow for a warning, green for a success, etc. In a technical sense, the grid table’s row Settings Template aggregate has to be implemented. The row Settings Template is where.


XML View coding

We have the Row Settings property named highlight set to the O Data service‘s Fax attribute. Please see the grid table topic for information on starting from scratch when building a UI control for a grid table. The aforementioned code is based on that post’s code. The value of the Fax attribute is not kept for some of the records in the OData service’s output. As a result, the formatter function used in the code above will return SUCCESS for entries for which fax is retained and ERROR for records of this type.


Controller coding: formatter function logic

The formatter function has been defined in the controller to return the correct value for the RowSettings highlight property. This is the code.

setHighLight:function(sProperty)
		{
			var highLightVal = '';
			if((sProperty === null) || (sProperty === ''))
			{
				highLightVal = sap.ui.core.MessageType.Error;
			}
			else
			{
				highLightVal = sap.ui.core.MessageType.Success;
			}
			return highLightVal;
		},

View the Row Highlighter in operation.

When you run the application, you will notice that rows will be highlighted in red and green depending on whether the Model’s Fax property is available.

Different Row Coloring

Up until now, every row has had the same background color—white. A characteristic of a grid table allows the rows to be alternately colored on a light grey background. To do this, set

The magic is accomplished by setting this property to true. Save the view code now, then launch the application once more. You’ll notice that the colors have been applied to alternate rows.

Please do the actions outlined in this blog article. In the comments box, please leave any questions, comments, or criticism. I will gladly reply as soon as possible.


you may be intereseted in this blog:-

Create and Configure Automation

Unleash the Power of Your Salesforce Inspector Extension

MASTER YOUR PRODUCT JOURNEY WITH SAP PLM (2024 GUIDE)

Elevating Data Interoperability: Exploring OData Implementations and Libraries

  • Related Posts

    Pop Up Debugging [ROBO 2.0]

    Barely any years back we told the best way to Investigate the Spring Up Screen utilizing scratch pad. Kindly check Spring Up Troubleshooting Stunt Instructional exercise here. I have named…

    Automatically Fill Test Data in FM & BAPIs for SE37 – The Lazy Way

    Automatically Fill Test Data in FM & BAPIs for SE37. We often come across many issues with the upload programs that we develop to facilitate mass upload. The most boring work…

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You Missed

    Pop Up Debugging [ROBO 2.0]

    • By Varad
    • May 7, 2025
    • 18 views
    Pop Up Debugging [ROBO 2.0]

    Automatically Fill Test Data in FM & BAPIs for SE37 – The Lazy Way

    • By Varad
    • May 6, 2025
    • 29 views
    Automatically Fill Test Data in FM & BAPIs for SE37 – The Lazy Way

    Fetching Data from Memory Stack Using New Tool (in Debugger)

    • By Varad
    • May 5, 2025
    • 29 views
    Fetching Data from Memory Stack Using New Tool (in Debugger)

    How to Debug any Work Item in SAP Workflow?

    • By Varad
    • May 4, 2025
    • 35 views
    How to Debug any Work Item in SAP Workflow?

    External Debugging of an Application of another SAP User in other Location in another Machine/System

    • By Varad
    • May 3, 2025
    • 58 views
    External Debugging of an Application of another SAP User in other Location in another Machine/System

    How to Debug any Work Item in SAP Workflow?

    • By Varad
    • May 2, 2025
    • 40 views
    How to Debug any Work Item in SAP Workflow?