cancel
Showing results for 
Search instead for 
Did you mean: 

coloring a row

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Please check the below answered thread for the same.

[;

Regards,

Manne.