private void editUserDataBtn_Click(object sender, EventArgs e) { EditProfile editprofile = new EditProfile(thisProfileData); editprofile.MdiParent = this.MdiParent; editprofile.Show(); }
private void userProfileManagmentGrid_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex == 0) // IF EDIT { DataGridViewRow selectedProfile = userProfileManagmentGrid.Rows[e.RowIndex]; EditProfile editprofile = new EditProfile(selectedProfile); editprofile.MdiParent = this.MdiParent; editprofile.Show(); //... } else if (e.RowIndex >= 0 && e.ColumnIndex == 1) { DataGridViewRow selectedProfile = userProfileManagmentGrid.Rows[e.RowIndex]; ProfilePage profilePage = new ProfilePage(selectedProfile); profilePage.MdiParent = this.MdiParent; profilePage.Show(); } }