I'm looking for a way for the pivot control (respectively the OlapViewModel) to preload all members of a hierarchy. I've just written my own function that loops recursively through all members and calls the OlapViewModel's "FillMembers"-function, but that takes way too long for larger hierarchies.
Is there maybe a built-in functionality to let the class preload all the members?
BR,
Tristan
Well, it seems that's a bug. I have attached a modified version of MainWindow.xaml.cs of Petar's sample where is used an extended version of XmlaDataSource that let's you to create an empty filter view model. Look at CreateEmptyFilterViewModel method where you can see the commented line of code which loads the root level (that's the way XmlaDataSource works) you don't need now because you're going to load the whole hierarchy.
I guess we will fix that for the upcoming SR.
Thanks.Plamen.
Oh, I see. Let me look at that in details and I will let you know later about my findings.
Plamen.
Sorry, but I guess you misunderstood me. In the sample Petar attached the problem occurs. Start it and as soon as it's loaded, the hierarchy doesn't work properly. Uncheck the first subnode of the "All"-member and you'll see what I mean. In larger hierarchies the problems even seem to be worse. For example checking/unchecking a node doesn't check any of it's children.
Hi,
I guess that's because you have set IFilterMember.IsSelected, however that property is bound to UI only and you have to call CommitChanges() of filter view model in order to get those changes into account. If you want to modify "the real" value you have to set IFilterMember.FilterSource.IsSelected and then you don't need to call CommitChanges().
Let me know if that works for you.
Hey Plamen,
I'm using the latest version of the control (12.1). And you are right, I've got it wrong: the LoadMembersAsync method actually loads all the hierarchy's members and I can use them the way I want. But now there seems to be another annoying issue. The ViewModels's AttachToProvider-method seems to break the hierarchical strucure. Run Petar's solution and wait until the preloaded hierarchy is added to the rows. Now uncheck the first city in the filter and you'll see that the "All"-member doesn't get the value "null" set - it is still checked!