6
Answers

how to fill datagridview with thousand of records quickly ?

Ajit N

Ajit N

5y
9.3k
1
Hello, I want to show thousand of records in datagridview within a second, i tried some code but it takes some minutes to show data in datagriview.
so help me how can i do this...
sample code below -
 
  1. public void BindData()  
  2.         {  
  3.             OleDbCommand cmd = new OleDbCommand("Select LC,Name from Ledger order by LC DESC", con);  
  4.             OleDbDataAdapter da = new OleDbDataAdapter(cmd);  
  5.             DataTable dt = new DataTable();  
  6.             da.Fill(dt);  
  7.             dataGridView1.DataSource = dt;  
  8.         }  
 
Answers (6)