private void dgSimilarArtists_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { frmMain.ArtistID = Convert.ToInt32(dgSimilarArtists.Rows[e.RowIndex].Cells[0].Value.ToString()); frmMain.ArtistName = dgSimilarArtists.Rows[e.RowIndex].Cells[1].Value.ToString(); frmMain.BandURL = dgSimilarArtists.Rows[e.RowIndex].Cells[2].Value.ToString(); ucArtistPage artistPage = new ucArtistPage(); mParent.ChangeSubForm(artistPage); } catch (Exception exc) { MessageBox.Show(exc.Message); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { frmMain.ArtistID = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString()); frmMain.ArtistName = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString(); frmMain.BandURL = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString(); }catch (Exception exc) { MessageBox.Show(exc.Message); } mParent = (this.ParentForm as frmMain); LastFMBrowser.Views.ucArtistPage artistPage = new ucArtistPage(); mParent.ChangeSubForm(artistPage); }