on 07-26-2010 1:12 PM
Hi ,
I have got a SFLIGHT table display , According to the Flight Number I want to change the color of textView in that table .
How should I do ?
I have followed teh following steps :
Created a Attribute colorCode of Type WDUI_TEXTVIEW_SEM_COL .
Then i have set the value of Marked whenvere i get flight no 0017 .
But this is working for the coplete column f flight number .
I want different colors for different flight numbers .
Thanks And Regards
Anuradha Rao
Hi
creat the attribute as baskar mentioned and bind it to the table coloum's cell design property .
below code will help youto get the color for cell based on condition .
method WDDOINIT .
* Coding for colouring the cell
LOOP AT lt_scarr INTO wa_scarr . "WHERE currcode = cky .
IF wa_scarr-currcode = cky . " condition checking
wa_scarr-cell_design = cl_wd_table_column=>e_cell_design-negative. " Redcolor
wa_scarr-img = '~Icon/GreenLed'.
ELSE.
wa_scarr-cell_design = 02.
wa_scarr-cell_design = cl_wd_table_column=>e_cell_design-positive. "Green color
ENDIF.
MODIFY lt_scarr FROM wa_scarr TRANSPORTING cell_design.
ENDLOOP.
endmethod .
Regards
chinnaiya P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You could create attribute celldesign of type WDUI_TABLE_CELL_DESIGN.
bind this attribute to the columns of the row in your table.
see example component : SALV_WD_TEST_TABLE_COLORS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.