我有数据网格和 90000 行。
90000 行数据网格打开得很晚。9秒打开。什么是加快开放速度的最佳方法?
我的代码:
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;
}
}
请帮我