This way I can delete empty rows from one datagridview.
bool Empty = true;
for (int i = 0; i < PrimaryRadGridView.Rows.Count; i++)
{
Empty = true;
for (int j = 0; j < PrimaryRadGridView.Columns.Count; j++)
{
if (PrimaryRadGridView.Rows[i].Cells[j].Value != null && PrimaryRadGridView.Rows[i].Cells[j].Value.ToString() != "")
{
Empty = false;
break;
}
}
if (Empty)
{
PrimaryRadGridView.Rows.RemoveAt(i);
}
}
I got around 6 datagridviews and I want to delete empty rows of all.
Is there a way to delete empty rows from all the datagridviews in the interface??
You could create a method
and pass each of your 6 DataGridViews to the method.