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