private void simpleButtonNew_Click(object sender, EventArgs e) { Config.NewKeyValue("Operation", (sender as SimpleButton).Text); this.gcMain.Refresh(); //this.gvMain.EndDataUpdate(); string s = gvMain.ActiveFilterString; gvMain.ClearColumnsFilter(); _frmDesigner.formAction = FormAction.New; _bindingSource.AddNew(); _bindingSource.EndEdit(); if (frmSingleDt == null) { frmSingleDt = new FrmSingleDt(_frmDesigner); } frmSingleDt.ShowDialog(); gvMain.ActiveFilterString = s; gvMain.ApplyColumnsFilter(); this.gvMain.BeginUpdate(); this.gcMain.DataSource = null; this.gcMain.DataSource = _bindingSource.DataSource; this.gvMain.EndUpdate(); this.gvMain.RefreshData(); DisplayData(); //this.bindingSource_CurrentChanged _data.DataChanged = false; }
private void simpleButtonNew_Click(object sender, EventArgs e) { Config.NewKeyValue("Operation", (sender as SimpleButton).Text); _frmDesigner.formAction = FormAction.New; _bindingSource.AddNew(); _bindingSource.EndEdit(); if (frmSingleDt == null) { frmSingleDt = new FrmSingleDt(_frmDesigner); } frmSingleDt.ShowDialog(); if (frmSingleDt.DialogResult == DialogResult.Cancel) { bsMain.DataSource = _data.DsData; } }