I have datagrid and 90000 row.
Line 90000 datagrid open very late. 9 seconds to open. What is the best way to speed the opening of the?
My code:
string sqlSorgu = "SELECT "+
" customer.id," +
" customer.medaxil_status," +
" customer.hesab_nomresi," +
" customer.soyad ," +
" customer.ad ," +
" customer.ataadi ," +
" customer.mebleg ," +
" customer.teskilat_kodu" +
" FROM customer ORDER BY customer.id ASC ";
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(sqlSorgu, Program.esas.bazayaQosul);
setx = new DataSet();
datatabmedaxil = new DataTable();
setx.Tables.Add(datatabmedaxil);
dataAdapter.Fill(datatabmedaxil);
MedaxilGridView1.DataSource = datatabmedaxil;
if (this.MedaxilGridView1.RowCount > 0)
{
for (int i = 0; i < this.MedaxilGridView1.RowCount; i++)
{
if (this.MedaxilGridView1["medaxil_status", i].Value.ToString() == "1")
this.MedaxilGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Pink;
else
this.MedaxilGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Empty;
}
}
Please Help me