My update code:
for (int i = this.MedaxilGridView1.CurrentCell.RowIndex; i < this.MedaxilGridView1.RowCount; i++)
{
// KartsifarishiGridView-dən id götürüb ona uyğun sorğumuzu yazırıq.
sqlSorgu = "UPDATE customer set medaxil_status = '0' WHERE id = " +
this.MedaxilGridView1.Rows[i].Cells["id"].Value;
//Sorğunu icra edirk.
Program.esas.sqlSorguCommand.CommandText = sqlSorgu;
Program.esas.sqlSorguCommand.Connection = Program.esas.bazayaQosul;
Program.esas.sqlSorguCommand.ExecuteNonQuery();
MedaxilGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Empty;
}
Row count : 18286
This version takes 5 minutes
How do I make it faster?