public void SetPivotGridControl(ABCPivotGridControl pivotGrid)
        {
            this.Chart.DataSource = pivotGrid.Grid;

            this.Chart.PivotGridDataSourceOptions.RetrieveEmptyCells = false;
            //this.Chart.PivotGridDataSourceOptions.RetrieveColumnGrandTotals=false;
            //this.Chart.PivotGridDataSourceOptions.RetrieveRowGrandTotals=false;
        }
Пример #2
0
        public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService svc = null;

            if (provider != null)
            {
                svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            }

            if (svc != null)
            {
                if (context.Instance is ABCPivotGridControl)
                {
                    ABCPivotGridControl grid = context.Instance as ABCPivotGridControl;
                    using (PivotGridFieldConfigForm form = new PivotGridFieldConfigForm(grid.FieldConfigs))
                    {
                        form.TableName       = grid.TableName;
                        form.RowTreeWidth    = grid.Grid.OptionsView.RowTreeWidth;
                        form.UseChartControl = grid.UseChartControl;
                        form.Script          = grid.Script;

                        if (svc.ShowDialog(form) == DialogResult.OK)
                        {
                            grid.FieldConfigs = form.FieldsList;
                            grid.InitFields();
                            grid.Grid.OptionsView.RowTreeWidth = form.RowTreeWidth;
                            grid.UseChartControl = form.UseChartControl;
                            //             grid.Script=form.Script;
                        }
                    }
                }
            }



            return(value);
        }