private void btnAddVariable_Click(object sender, EventArgs e) { ChooseVariable frmVariable = new ChooseVariable(); if (frmVariable.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _table.Variables.Add(frmVariable.SelectedVariable); lbVariables.SelectedItem = frmVariable.SelectedVariable; pxVariableBindingSource.DataSource = frmVariable.SelectedVariable; } }