I would like to enable AsyncMode for all my PivotGrids, because mostly the contains enormous amount of data and working without AsyncMode looks strange from end-user perspective. I was following this ticket http://www.devexpress.com/Support/Center/Question/Details/Q324108 and set the OptionsBehavior.UseAsyncMode property to True.
C#public class PivotGridController : ObjectViewController<ListView, CapacityCubeItem>
{
protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated();
PivotGridListEditor listEditor = View.Editor as PivotGridListEditor;
if (listEditor != null)
{
if (listEditor.PivotGridControl == null)
{
listEditor.ControlsCreated += listEditor_ControlsCreated;
}
else
{
SetupPivotGridControl(listEditor.PivotGridControl);
}
}
}
void listEditor_ControlsCreated(object sender, EventArgs e)
{
SetupPivotGridControl((PivotGridControl)sender);
}
private void SetupPivotGridControl(PivotGridControl pivotGridControl)
{
pivotGridControl.OptionsBehavior.UseAsyncMode = true;
}
}
Everything works perfectly with one significant exception. When PivotGridControl is initialized for the first time, data are loaded before I can switch its behavior to AsyncMode. Is there any way how to make control use AsyncMode right away (including its initialization). It looks very ugly now, when end-user opens ListView or DetailView containing the PivotGridControl and entire GUI freez like something is broken for a long time (until data are loaded).
Thank you for any advice.