私はデータグリッドと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;
}
}
私を助けてください