/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChangeAlbumButton_Click(object sender, EventArgs e) { // In the main form, the user clicked the ChangeAlbum button // this causes an ChangeAlbum form to pop-up DialogResult dr = new DialogResult(); ChangeAlbumWF frm = new ChangeAlbumWF(); // After the ChangeAlbum form has been closed, determine why dr = frm.ShowDialog(); if (dr == DialogResult.OK) { MessageBox.Show("Main: ChangeAlbum: User clicked OK button"); // Refresh the datagrid this.albumViewTableAdapter.Fill(this.cDCatalogDataSet.AlbumView); // the following did not work with selecting a row and did not fill the entire grid (of course): // List<CDCatalogEF.Album> albumList = Album.GetAllAlbums(); // this.albumDataGridView.DataSource = albumList; } else if (dr == DialogResult.Cancel) { MessageBox.Show("Main: ChangeAlbum: User clicked Cancel button"); } }