We have an application which uses the Infragistics pivot table control, and have programmed a function which can iterate through and open all of the elements in a dimension. Since the deployment of your new version, our control no longer functions correctly. We can still iterate through and open the top level elements, but subsequent levels can no longer be opened programmatically. We have debugged the running code and determined that second (and lower) level elements briefly get a “-“ in front of their names, which has disappeared the next time we are able to interact with the objects.
A sample project which illustrates the problem is attached. In order to cause the malfunction, you need only start the solution and click the “connect” button in the upper left corner. We are aware of the fact that our implementation of the code is not really suitable for productive use, but in this case the error is always the same, which the sample project should illustrate.
We have also tried to open the elements through the FilterViewModel, but in the new release, this object loses synchronicity with the grid as soon as the grid is manipulated by the user in any way. Is there another way to open all elements (rows and columns) programmatically? Thank you in advance.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
We are using 12.1.20121.2107, same as you.
In our example, after the first click on the "Click me"-Button, we see
"All Sales Reasons" expanded whilst "Australian Dollar", "Canadian Dollar", "EURO", "United Kingdom Pound" and "US Dollar" are collapsed.
After the second click on that button, all sales reasons are collapsed again.
Don't you experience that behaviour?
BR
I was able to reproduce your behavior and I can say that due to performance optimizations and virtualizations that are made in version 12.1 this approach no longer works, because a lot of background operations are executed asynchronous. I can suggest you either use version 11.2 where this approach works or wait till we release version 12.2 in the middle of the month, where there will be a built in functionality for expanding hierarchies to a certain level. The code there will look like this:
private void ExpandToLevel(object sender, RoutedEventArgs args)
{
var fvm = FindDateViewModel(dataSource);
Task expandTask1 = dataSource.ExpandToLevelAsync(fvm, fvm.Hierarchy.Levels.Count - 1);
expandTask1.ContinueWith(t => dataSource.RefreshGrid(), TaskContinuationOptions.ExecuteSynchronously);
}
Hope this helps you.
Hello Stefan,
I just tried your solution and it works great - Thank you!
Hello again,
After further investigation I was able to create a similar methods like the ones that will be built in version 12.2 and now the hierarchies expand as you want. You can find the sample attached to my previos post ("PivotExpandAllXMLA.zip").
Thanks for your efford and for providing us with this information.
Since some of your improvements in version 12.1 are needed in our solution going back to 11.2 is no option for us.
As soon as 12.2 is released we will try to use the built in functionality and let you know if we face any new issues.
best regards