Skip to Content
avatar image
Former Member

coloring a row

Hi All,

I'm working on WD application,

i need to color the particular row of a table based on some condtion,

how to do this . explain in steps..

Thanks & Regards

Suprith

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 10, 2009 at 06:04 AM

    Hi,

    Please check the below answered thread for the same.

    [Color a table row;

    Regards,

    Manne.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 06:25 AM

    Hi,

    Following piece of code may help you -

    You have to loop at table columns and set the cell design fieldname like this

    *  loop at lt_column into ls_column.
    *
    ** bind the context attribute 'CELL_COLOR' as deisgn field for all of the columns, this will decide
    ** the color for totals column.
     
        CALL METHOD LS_COLUMN-r_column->SET_CELL_DESIGN_FIELDNAME
          EXPORTING
           VALUE = 'CELL_COLOR'.

    Here CELL_COLOR is a table column ( it can be hidden ) and based on your logic you can populate the cell_color value.

    CELL_COLOR is of type WDUI_TABLE_CELL_DESIGN.

    Hope this helps

    Regards

    Manas Dua

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 10:22 AM

    Hi,

    Create attributes of type WDUI_TABLE_CELL_DESIGN and go to the Table layout where you want to colour the cell.

    Eg : Main_table contains columns COL1,COL2, and COL3 and I imagine you want to colour the first cell (COL1).

    go to cellDesign of COL1 and bind it to the attribute you have created already.

    Eg : wa_mainhead-c1_cell = cl_wd_table_column=>e_cell_design-criticalvalue_dark."Orange Color

    wa_drihead-c1_cell = cl_wd_table_column=>e_cell_design-key_medium."Blue color

    wa_vehhead-c1_cell = cl_wd_table_column=>e_cell_design-goodvalue_light."Green Color

    by passing the above values to the attributes in your code, the cells can be coloured..

    Hope this help you..

    Regards,

    Mohamed Meeran

    Add comment
    10|10000 characters needed characters exceeded