how to clear data from datagridview in c# code example Example: c# datagridview clear all rows dataGridView1.Rows.Clear(); dataGridView1.Refresh();