public override void InitComponent()
 {
     LockApply--;
     try {
         for (int i = 0; i < PrintFlags.Length; i++)
         {
             CheckEdit chb = CheckEditByIndex(i);
             if (chb != null)
             {
                 chb.Checked = SetOptions.OptionValueByString(PrintFlags[i], EditingView.OptionsPrint);
                 if (chb.Checked)
                 {
                     chb.Checked = true;
                 }
             }
         }
     } finally { LockApply++; }
     CurrentView.OptionsView.BeginUpdate();
     try {
         OnCheckBoxHeaderCheckStateChanged(CheckBoxHeader, EventArgs.Empty);
         OnCheckBoxPreviewCheckStateChanged(CheckBoxPreview, EventArgs.Empty);
         OnCheckBoxFooterCheckStateChanged(CheckBoxFooter, EventArgs.Empty);
         OnCheckBoxGroupFooterCheckStateChanged(CheckBoxGroupFooter, EventArgs.Empty);
         OnCheckBoxHorzLinesCheckStateChanged(CheckBoxHorzLines, EventArgs.Empty);
         OnCheckBoxVertLinesCheckStateChanged(CheckBoxVertLines, EventArgs.Empty);
         OnCheckBoxAutoWidthCheckStateChanged(CheckBoxAutoWidth, EventArgs.Empty);
         OnCheckBoxDefaultStylesCheckStateChanged(CheckBoxDefaultStyles, EventArgs.Empty);
         OnCheckBoxStylesCheckStateChanged(CheckBoxEvenRow, EventArgs.Empty);
         OnCheckBoxStylesCheckStateChanged(CheckBoxOddRow, EventArgs.Empty);
         OnCheckBoxCheckStateChanged(CheckBoxSelectedRows, EventArgs.Empty);
     } finally { CurrentView.OptionsView.EndUpdate(); }
     CurrentView.AppearancePrint.Assign(EditingView.AppearancePrint);
     CurrentView.OptionsPrint.Assign(EditingView.OptionsPrint);
     InitViewStyles();
     lbCaption.Text             = GridLocalizer.Active.GetLocalizedString(GridStringId.PrintDesignerGridView);
     CurrentView.PaintStyleName = "MixedXP";
 }
コード例 #2
0
            static public void GetPivotGridOtionsView(PivotGridControl pivotGrid, DataSet ds)
            {
                DataTable dt = ds.Tables[TableName];

                if (dt == null)
                {
                    return;
                }

                PropertyDescriptorCollection pds = TypeDescriptor.GetProperties(pivotGrid.OptionsView);

                foreach (PropertyDescriptor pd in pds)
                {
                    if (pd.PropertyType.Equals(typeof(bool)) && pd.Name.IndexOf("Total") > -1)
                    {
                        DataRow row = dt.NewRow();

                        row[PropertieName] = pd.Name;
                        row[Checked]       = SetOptions.OptionValueByString(pd.Name, pivotGrid.OptionsView);

                        dt.Rows.Add(row);
                    }
                }
            }