Setting the DataSource to null alone didn’t work for me, but combining it with a call to Refresh resolved the issue.
// Clear the DataGridView dgv.DataSource = null; // Refresh the control to ensure it updates visually dgv.Refresh();