Esempio n. 1
0
        void pivotGrid_CellDoubleClick(object sender, PivotCellEventArgs e)
        {
            AsyncCompletedHandler showDrillDownHandler = delegate(AsyncOperationResult result) {
                try {
                    if (result.Exception != null)
                    {
                        DXMessageBox.Show(result.Exception.Message);
                    }
                    else
                    {
                        ShowDrillDown((PivotDrillDownDataSource)result.Value);
                    }
                } catch (Exception ex) {
                    DXMessageBox.Show(ex.Message);
                }
            };

            pivotGrid.CreateDrillDownDataSourceAsync(e.ColumnIndex, e.RowIndex, showDrillDownHandler);
        }
        public static void Initialize(PivotGridControl pivot, AsyncCompletedHandler initCompletedCallback, InitializerDataSource dataSource)
        {
            AsynchronousPivotInitializer initializer;

            switch (dataSource)
            {
            case InitializerDataSource.OlapCube:
                initializer = new AsynchronousPivotInitializerSampleOlapDB(pivot, initCompletedCallback);
                initializer.Initialize();
                break;

            case InitializerDataSource.TableDataSource:
                initializer = new AsynchronousPivotInitializerGeneratedDB(pivot, initCompletedCallback);
                initializer.Initialize();
                break;

            default:
                throw new ArgumentException("Incorrect InitializerDataSource enum value.", "dataSource");
            }
        }
 public AsynchronousPivotInitializerGeneratedDB(PivotGridControl pivot, AsyncCompletedHandler initCompletedCallback)
     : base(pivot, initCompletedCallback)
 {
 }
 protected AsynchronousPivotInitializer(PivotGridControl pivot, AsyncCompletedHandler initCompletedCallback)
 {
     PivotGrid = pivot;
     ResetPivotGrid(PivotGrid);
     InitializationCompletedCallback = initCompletedCallback;
 }