private void gridViewArticulo_ShowingPopupEditForm(object sender, 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; } } } }
private static void grvMain_ShowingPopupEditForm(object sender, 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) { var simpleButton = button as SimpleButton; ChangeButtonCaption(simpleButton); ChangeButtonSize(simpleButton); } } } } }
private void gvOreBody_ShowingPopupEditForm(object sender, ShowingPopupEditFormEventArgs e) { //foreach (var button in e.EditForm.Controls.OfType<EditFormContainer>() // .SelectMany(control => Enumerable.Cast<Control>(control.Controls)).OfType<PanelControl>() // .SelectMany(nestedControl => Enumerable.Cast<Control>(nestedControl.Controls)).OfType<SimpleButton>()) //{ // switch (button.Text) // { // case "Update": // // Hide this button for the form will be read-only. // button.Visible = false; // break; // case "Cancel": // // Replace the Cancel button text with a localized version of the word Continue. // button.Text = "Continue"; // break; // } //} }
private void kkoGridView_ShowingPopupEditForm(object sender, ShowingPopupEditFormEventArgs e) { GridView view = sender as GridView; bool ro = view.GetFocusedRowCellValue("EDITABLE").ToString() == "F"; for (int i = 0; i < view.Columns.Count; i++) { if (view.Columns[i].Visible) { if (ro || !view.Columns[i].OptionsColumn.AllowEdit) { e.BindableControls[view.Columns[i].FieldName].Enabled = false; } } } if (view.GetFocusedRowCellValue("VSBL").ToString() == "F") { e.BindableControls["DETAY"].Enabled = false; } }
private void advBandedGridView1_ShowingPopupEditForm(object sender, 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; } if (button.Text == "취소") { var btnCancel = button as SimpleButton; btnCancel.Click -= editFormCancelButton_Click; btnCancel.Click += editFormCancelButton_Click; } else { var btnUpdate = button as SimpleButton; btnUpdate.Click -= editFormUpdateButton_Click; btnUpdate.Click += editFormUpdateButton_Click; } } } } }
private void gridView1_ShowingPopupEditForm(object sender, ShowingPopupEditFormEventArgs e) { }
private void gvSectionCal_ShowingPopupEditForm(object sender, ShowingPopupEditFormEventArgs e) { //e.EditForm.Height = value; //e.EditForm.WindowState = FormWindowState.Maximized; e.EditForm.StartPosition = FormStartPosition.CenterScreen; }