Hi,
How can I Expand/Collapse All.
I use the following code. But it throws the exception
What am I doing wrong?
private void ExpandAll(Collection<PivotHeaderCell> pivotHeaderCells) { foreach (PivotHeaderCell cell in pivotHeaderCells) { cell.IsExpanded = true; if (cell.Children.Count > 0) CollapseAll(cell.Children); } }
Thanks
Sangeetha
I would like to know your solutiion if possible.
I got this working by using a delegate around the line I set expand/collase once I upgraded to V11.2
Hi Stefan,
Thank You for your immediate reply.
Yes the solution works fine. There is one small problem though - I don't see any suitable place to turn the expand boolean off - I want to expand only when ExpandAll button is clicked, and not when just layout is updated. What would you suggest as a good place to turn this off.
Also, I would like to have a bug report created for the Background worker exception.
Hello Sangeetha,
I tried the sample with the latest service release and everything was as you said, so I modified it by using a different logic to expand all cells, this time without BackgroundWorker, so now it works as expected.
Hope this helps.
I updated my WPF to the latest Service Release 2094, and noticed that the Expand/Collapse code won't work anymore - I think Background worker has a bug in it. I just ran your sample and I see the same exception. Could you please investigate and let me know if it is a bug or some functionality changed.