コード例 #1
0
 private void Artista_gridView_ShowingPopupEditForm(object sender, DevExpress.XtraGrid.Views.Grid.ShowingPopupEditFormEventArgs e)
 {
     foreach (Control control in e.EditForm.Controls)
     {
         if (control is EditFormContainer)
         {
             foreach (Control nestedControl in control.Controls)
             {
                 if (nestedControl is PanelControl)
                 {
                     foreach (Control button in nestedControl.Controls)
                     {
                         if (button is SimpleButton)
                         {
                             SimpleButton simpleButton = button as SimpleButton;
                             if (string.Compare(simpleButton.Text, "Actualizar", true) == 0)
                             {
                                 simpleButton.Name = "ActualizarBoton";
                             }
                             simpleButton.Click += simpleButton_Click;
                             //simpleButton.Visible = false;
                         }
                     }
                 }
                 //if (nestedControl is PictureEdit) {
                 //    (nestedControl as PictureEdit).Image = null;
                 //}
             }
         }
     }
 }
コード例 #2
0
 private void gridView_ShowingPopupEditForm(object sender, DevExpress.XtraGrid.Views.Grid.ShowingPopupEditFormEventArgs e)
 {
     foreach (Control control in e.EditForm.Controls)
     {
         if (!(control is EditFormContainer))
         {
             continue;
         }
         foreach (Control nestedControl in control.Controls)
         {
             if (!(nestedControl is PanelControl))
             {
                 continue;
             }
             foreach (Control button in nestedControl.Controls)
             {
                 if (!(button is SimpleButton))
                 {
                     continue;
                 }
                 var simpleButton = button as SimpleButton;
                 simpleButton.Click -= editFormUpdateButton_Click;
                 simpleButton.Click += editFormUpdateButton_Click;
             }
         }
     }
 }
コード例 #3
0
        public void gvMain_ShowingPopupEditForm(object sender, DevExpress.XtraGrid.Views.Grid.ShowingPopupEditFormEventArgs e)
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmThongTinHocSinh));

            e.EditForm.MaximizeBox = false;
            e.EditForm.MinimizeBox = false;

            foreach (Control control in e.EditForm.Controls)
            {
                if (control is EditFormContainer)
                {
                    foreach (Control nestedControl in control.Controls)
                    {
                        if (nestedControl is PanelControl)
                        {
                            foreach (Control button in nestedControl.Controls)
                            {
                                if (button is SimpleButton)
                                {
                                    SimpleButton simpleButton = button as SimpleButton;

                                    if (!EDIT_FORM_BUTTON_CAPTION_TO_IMAGE_MAP.ContainsKey(simpleButton.Text))
                                    {
                                        return;
                                    }

                                    simpleButton.Image = ((System.Drawing.Image)(resources.GetObject(EDIT_FORM_BUTTON_CAPTION_TO_IMAGE_MAP[simpleButton.Text])));
                                    simpleButton.Text  = EDIT_FORM_BUTTON_CAPTION_MAP[simpleButton.Text];

                                    ActivityTrackerFacade.InitActivityTracker(e.EditForm);
                                }
                            }
                        }
                    }
                }
            }

            // Perform cancelling on EditForm closed
            GridView   gridView = sender as GridView;
            UCCRUDBase uc       = gridView.OptionsEditForm.CustomEditFormLayout as UCCRUDBase;

            uc.GridView            = gridView;
            e.EditForm.FormClosed += new FormClosedEventHandler(EditForm_FormClosed);
        }
コード例 #4
0
 protected void GridViewMain_ShowingPopupEditForm(object sender, DevExpress.XtraGrid.Views.Grid.ShowingPopupEditFormEventArgs e)
 {
     e.EditForm.ControlBox = false;
 }