0

How to get column header name in Pivot Table

asked 2011-06-21 07:38:00 +0800

abb222222 gravatar image abb222222
30

I have the following function to get the column header name when mouse over the pivot table.

public void onPivotTooltip(PivotUIEvent event) {
if (event.getFieldType() == PivotField.AREA_ROW) {
rawDataLayout.appendChild(new Label(event.getRowContext().getNode().getField().getTitle()));
popup.open(pivot, "overlap");
} else {
popup.close();
}
}

This works well for a few number of rows. If the number of rows increases, "event.getRowContext().getNode()" obtains null in some rows.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-06-21 07:48:29 +0800

abb222222 gravatar image abb222222
30

And is there anyone have tried to get the label on the cell?
How to get the label "Price" and "Mileage" from the following pivottable?
http://books.zkoss.org/images/d/d0/ZKPivotEsn_work_pivot_22.png

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-06-21 07:38:00 +0800

Seen: 204 times

Last updated: Jun 21 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More