Skip to Content
author's profile photo Former Member
Former Member

Set a colour to a row in a table view which does not use an iterator

Hi ,

I have an application , which displays data using a table view.

How can i set colour to a row based on the value of one of its coloums.

The table view does not use an itertator.

Thanks

Arun

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Mar 25, 2006 at 06:39 AM

    you can use the following code in the ONMANIPULATION event to modify the color of the row. but be aware that if SAP changes rendering ot htmlb:tableview it may not work.

    this code sample set the bgcolor of row 2 to blue.

    DATA: httpbody TYPE string .

    CALL METHOD response->if_http_entity~get_cdata

    RECEIVING

    data = httpbody.

    REPLACE ALL OCCURRENCES OF '<tr rr="2"' IN httpbody WITH '<tr rr="2" bgcolor="blue"' IGNORING CASE .

    CALL METHOD response->if_http_entity~set_cdata

    EXPORTING

    data = httpbody.

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.