on 07-07-2008 8:48 AM
Hello everybody,
I have a question for Web Dynpro ABAP - Table display.
I have a table to be displayed and in this table I would like to change color for certain cells based on its values (e.g. if it has "ERROR" - highlght this cell with red color). This table is a normal table not an ALV.
Please could you kindly help me how can I do this
I have browesd sdn.sap.com but found only one example for WD Java.
Thank you in advance
With the best regards
Andrey
Edited by: Andrey Adov on Jul 7, 2008 9:48 AM
hi andrey....
if you want to do it dynamically, add another field to the internal table that is bound to the table ui element.
this field must be bound to the cell design property. now you can pass values like 1, 2, etc.... to change the colour of the cell.
---regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
Thanks a lot
that has helped:
Short summary:
1. Create new attribute (e.g. with the name "COLOR") in the context with type WDUI_TABLE_CELL_DESIGN.
2. This attribute should be binded with corresponding cell in the layout with CellDesign property.
3. Before binding the table provide this attribute with values for color (01,02, ...):
03 badvalue_dark
05 badvalue_light
04 badvalue_medium
25 calendarAqua
22 calendarBlue
28 calendarBrown
30 calendarGreen
20 calendarMetal
21 calendarPeach
24 calendarPurple
23 calendarRose
27 calendarYellow
06 criticalvalue_dark
08 criticalvalue_light
07 criticalvalue_medium
19 four
09 goodvalue_dark
11 goodvalue_light
10 goodvalue_medium
13 group_level1
14 group_level2
15 group_level3
12 key_medium
01 negative
16 one
02 positive
00 standard
18 three
17 two
31 five
32 selection
34 subtotal
35 subtotal_light
33 total
33 total
4. Bind the table
Thank you once again
Best regards
Andrey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
there is an option in the table properties "CELL DESIGN".
u can give different values to get different colors. u can bind an attribute to this property and dynamically pass the values to it based on the values in the column.
regards
chythanya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.