on 06-24-2006 6:53 PM
Hi,
I am developing one application using IWdTables. I need to diplay one table cell data with color RED, if the data is negative.
I tried to solve the problem by getting TableCellEditor, but i was unable to change the color.
Could you people look in to the issue and send me the code to resolve my problem.
Thank you,
B.Sandeep Kumar
Let "Rows" be the table data source node and "Value" be the attribute that stores the value.
Add a value node "Decoration" (cardinality=1:1,selection=1:1,singleton=false) under "Rows".
(If "Rows" is a value node, you can omit the helper node "Decoration" and add the attribute to "Rows")
Add a calculated attribute "Color" of type com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor under "Decoration".
Bind property "semanticColor" of the TextView (table cell editor) to attribute "Color".
In the getColor() method, you write something like
WDTextViewSemanticColor getColor(IDecorationElement element)
{
IRowsElement row = (IRowsElement) element.node().getParentElement();
return row.getValue() < 0
? WDTextViewSemanticColor.NEGATIVE
: WDTextViewSemanticColor.STANDARD;
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.