Hi
I download your service release.
Bug when i have more than two measures added from the code (not by the user’s action) is repaired.
But i found another bug?
From code i expanding hierarchy and use UpdateVisualMembers method on ResultChanged, xamPivotGrid freeze again.
void DS_ResultChanged2(object sender, AsyncCompletedEventArgs e)
{
this.DS.ResultChanged -= new EventHandler<AsyncCompletedEventArgs>(DS_ResultChanged2);
DataSourceBase dataSourceBase = (DataSourceBase)this.DS;
dataSourceBase.HierarchyExpansionMode = HierarchyExpansionMode.DrillDown;
dataSourceBase.UpdateVisualMembers(Infragistics.Olap.ExecutionContext.Rows);
dataSourceBase.UpdateVisualMembers(Infragistics.Olap.ExecutionContext.Columns);
dataSourceBase.HierarchyExpansionMode = HierarchyExpansionMode.SingleLevelOnly;
this.DS.RefreshGrid();
this.IsBusy = false;
}
I’m looking in to your question and I’ll follow up with you as soon as I’ve have a chance to review your code.
You mentioned that you had just applied a service release. Are you working with NetAdvantage 2011 Vol. 1, the latest service release?
Yes i use 2011 Vol. 1.
Before service release i had this problem
http://forums.infragistics.com/forums/t/56547.aspx
After i instal service release it is work, but when i try expand dimension from code, it still freeze.
I have 5 measures in adodatasource.
On my ResultChange event i have this code:
void DS_ResultChanged(object sender, AsyncCompletedEventArgs e)
this.DS.ResultChanged -= new EventHandler<AsyncCompletedEventArgs>(DS_ResultChanged);
this.DS.DeferredLayoutUpdate = true;
//expand dimension 1
LevelHotelDepth = 2;
BackgroundWorker worker = new BackgroundWorker();
worker.DoWork += worker_DoWorkHotel;
worker.RunWorkerCompleted += (s, ex) =>
_isHotelyLoaded = true;
if ((_isDatumLoaded) && (_isHotelyLoaded))
this.DS.ResultChanged += new EventHandler<AsyncCompletedEventArgs>(DS_ResultChanged2);
this.DS.DeferredLayoutUpdate = false;
};
worker.RunWorkerAsync(this.DS);
//expand dimension 2
LevelCasDepth = 3;
BackgroundWorker worker2 = new BackgroundWorker();
worker2.DoWork += worker_DoWorkCas;
worker2.RunWorkerCompleted += (s2, ex2) =>
_isDatumLoaded = true;
worker2.RunWorkerAsync(this.DS);
Procedure worker_DoWorkCas and worker_DoWorkHotel have same logic
void worker_DoWorkCas(object sender, DoWorkEventArgs e)
DataSourceBase dataSource = e.Argument as DataSourceBase;
IFilterViewModel fvm = dataSource.Columns[0] as IFilterViewModel;
if (fvm != null)
fvm.LoadFilterMembersCompleted += (sender1, e1) =>
manualResetEventCas.Set();
if (fvm != null && fvm.FilterMembers != null)
foreach (IFilterMember member in fvm.FilterMembers)
DrillInCas(fvm, member);
Inside DrillIn method is some logic for expand dimension (one for dimension 1 and another for dimension 2).
May be problem is in some lock when i running 2 background worker in same time?