Ejemplo n.º 1
0
 private void UpdateMasterDetailSettings()
 {
     CurrentView.BeginUpdate();
     CurrentView.ExpandAllGroups();
     CurrentView.FocusedRowHandle = 0;
     CurrentView.TopRowIndex      = 0;
     CurrentView.SetMasterRowExpanded(CurrentView.FocusedRowHandle, true);
     if (ceMasterDetail.Checked)
     {
         if (FirstDetailView != null)
         {
             FirstDetailView.ExpandGroupRow(-1);
         }
     }
     else
     {
         CurrentDetailView.ExpandAllGroups();
     }
     CurrentView.EndUpdate();
 }
 void InitViewStyles()
 {
     CurrentView.BeginUpdate();
     try {
         CurrentView.Appearance.Reset();
         if (CheckBoxDefaultStyles.Checked)
         {
             GridViewPrintAppearances collection = ((BaseViewPrintInfo)typeof(
                                                        GridView).InvokeMember("CreatePrintInfoCore", BindingFlags.Instance |
                                                                               BindingFlags.NonPublic | BindingFlags.InvokeMethod, null,
                                                                               CurrentView, new object[] {
                 new PrintInfoArgs(CurrentView)
             })).AppearancePrint as
                                                   GridViewPrintAppearances;
             if (collection != null)
             {
                 CurrentView.Appearance.Assign(collection);
                 CurrentView.Appearance.HorzLine.Assign(collection.Lines);
                 CurrentView.Appearance.VertLine.Assign(collection.Lines);
             }
         }
         else
         {
             CurrentView.Appearance.Assign(EditingView.PaintAppearance);
         }
         CurrentView.Appearance.FooterPanel.BorderColor  = CurrentView.Appearance.FooterPanel.BackColor;
         CurrentView.Appearance.HeaderPanel.BorderColor  = CurrentView.Appearance.HeaderPanel.BackColor;
         CurrentView.Appearance.GroupFooter.BorderColor  = CurrentView.Appearance.GroupFooter.BackColor;
         CurrentView.OptionsView.EnableAppearanceEvenRow = CheckBoxDefaultStyles.Checked ?
                                                           CheckBoxEvenRow.Checked : EditingView.OptionsView.EnableAppearanceEvenRow;
         CurrentView.OptionsView.EnableAppearanceOddRow = CheckBoxDefaultStyles.Checked ?
                                                          CheckBoxOddRow.Checked : EditingView.OptionsView.EnableAppearanceOddRow;
         CurrentView.Appearance.Empty.BackColor = CurrentView.Appearance.Empty.BackColor2 =
             Color.White;
     } finally { CurrentView.EndUpdate(); }
 }