cancel
Showing results for 
Search instead for 
Did you mean: 

Painting a cell

Former Member
0 Kudos

Hi,

It is possible to paint a cell of a table? For example, paint only the cells of a column that contains a number bigger than 10.

Thanks in advance,

Ricard.

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

Hi Oscar,

  • In your table node, add a subnode with singleton=false, cardinality 1..1 and selection cardinality 1..1.

  • Add an attribute of type TableCellDesign and set the calculated property to true.

  • Bind the tablecolumn's cellDesign property to this attribute.

  • In the generated get<SubNode><CalcAttribute> method, you could have something like:


Integer intElement = (Integer)element.getAttributeValue(<table node attribute to test against>);
int intValue = intElement.intValue();
if (intValue <10)
    return WDTableCellDesign.STANDARD;
else
    return WDTableCellDesign.CRITICALVALUE_LIGHT;

Hope this explains!

Robin

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

i think it is possible, you just bind the celldesign to context