protected override void OnButtonClick(object sender, MouseEventArgs e) { if (FocusedCell == null) { return; } ConsInvitedDeptsDialog panel = new ConsInvitedDeptsDialog(DataObj); panel.ShowDialog(); // 保存 if (panel.DialogResult == DialogResult.OK) { FocusedCell.SetValue(ConstructInvitedDeptInfo(this.DataObj)); //gridControl.DataTableShared.CloseEditor(null); gridControl.CloseEditor(); } }
void CustomRefControl_KeyPress(object sender, KeyPressEventArgs e) { if (FocusedCell == null) { return; } ConsInvitedDeptsDialog panel = new ConsInvitedDeptsDialog(DataObj); panel.ShowDialog(); // 保存 if (panel.DialogResult == DialogResult.OK) { FocusedCell.SetValue(ConstructInvitedDeptInfo(this.DataObj)); //gridControl.DataTableShared.CloseEditor(null); gridControl.CloseEditor(); } }