private void btnConfigure_Click(object sender, EventArgs e) { var gvmc = new GridViewModeConfig { ModeConfig = ModeConfig }; gvmc.ShowDialog(this); ModeConfig = gvmc.ModeConfig; gvmc.Dispose(); }