cancel
Showing results for 
Search instead for 
Did you mean: 

setting number of rows in a table that uses treebynestingtablecolumn

MG3
Contributor
0 Kudos

hi

I need to control the size of the table - rows when the user expands and collapses the trees.

I have set the paginator to a context attribute, and when im populating the table, i count the number of header rows and the children rows and calculate the number of rows to be displayed.

But when the user collapses a tree, the size of the table must reduce to the correct number of rows which are actually displayed.

I tried to use the 'Expanded' boolean, but somehow it doesnt work. any other approach?

thanks

oj

Accepted Solutions (1)

Accepted Solutions (1)

arun_srinivasan
Contributor
0 Kudos

hi

try this

set the visiblerowcount to -1 (minus 1)

hope this helps,

Regards,

Arun

MG3
Contributor
0 Kudos

hey arun...cool...worked beautifully!

Answers (1)

Answers (1)

MG3
Contributor
0 Kudos

just a small variation in this...the max number of rows i can display is 20. any more and i would have to use th e paginator controls.

thanks

oj

Former Member
0 Kudos

This can be achieved using a calculated attribute "VisibleRowCount", type "integer", readOnly=true.

int getVisibleRowCount(...)
{
  int rowCount = wdContext.node<TableDataSource>().size();
  return rowCount > 20
    ? 20
    : -1; /* show all rows */
}

Bind Table.visibleRowCount property to this attribute.

Armin