cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the colour of the table cell editor on some condition?

Former Member
0 Kudos

Hi all,

I have a requirment acco which i need to make the colour of the tableceleditor ias RED and font color white when the data in that is < 0.please tell me how is this possible and its urgent..

regards

Sharan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

If you are using release NW04 and have a TextView as table cell editor, you can do this:

Add a calculated attribute "Color" of DDIC type "com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor" under the data source node of the table.

Bind the "semanticColor" of the cell editor to this context attribute.

Implement the get-method for the calc. attribute like this


WDTextViewSemanticColor get<DataSourceNode>Color(I<DataSourceNode>Element element)
{
  return element.getValue() < 0 ? WDTextViewSemanticColor.NEGATIVE : WDTextViewSemanticColor.STANDARD;
}

Armin

Former Member
0 Kudos

Hi,

This is possible from NW04s onwards

Pl go through this blog /people/sap.user72/blog/2006/04/25/colourful-table-in-web-dynpro

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

You can use a TableCellVariant for this purpose. Go through this [article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961] to know more.

Regards,

Satyajit.