cancel
Showing results for 
Search instead for 
Did you mean: 

How to span rows of a Table control

Former Member
0 Kudos

Hi,

I am displaying my data in a table control. For one Column of the table the same data is repeated, I don't want to show the same data for that particular column again and again in every row. I want to span the Rows for that particular column and show it as a single value.

Can any one help me in this regard.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Abhimanyu,

First, this functionality is available in NW04s only -- setting grouping value will do row span automatically for you, and grid lines are drawn accordingly.

Second, in NW04 you may emulate this behavior almost identically, however, you will see extra grid lines (sorry, no workaround).

Create a calculated read-only attribute of type Visibility, bind visibility property of cell editor to this attribute, and write the following in attribute getter:


if ( element.index() == 0 ) return WDVisibility.VISIBLE;
final IWDNodeElement prev = element.node().getElementAt
( 
  element.index() - 1
);
return 
  element
    .getAttributeValue("<Your-GrouppingAttr>")
      .equals( prev.getAttributeValue("<Your-GrouppingAttr>") ) ?
  WDVisibility.NONE : WDVisibility.VISIBLE;

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Small but important addition -- node elements must be sorted by grouping attribute (any order ASC/DESC) to make my code works correctly.

VS