/// <summary> /// Update DataGridView with Selected User. /// </summary> /// <param name="id">ID from selected user.</param> private void RefreshDataGrid(int id) { try { // Get List of Albums List <Albums> userAlbums = sendRequest.RequestAlbumsByUser(id); dataGridViewAlbums.DataSource = null; // Fill datagridview dataGridViewAlbums.DataSource = userAlbums; } catch (Exception ex) { MessageBox.Show("Exception: " + ex.Message + "\nSource : " + ex.Source, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); } }