How to display millions of rows in a DataGridView?

Viewed 71

I've read a lot of questions about that but i couldn't find one.

What is a relevant and efficient way to display millions of data?

string query = "SELECT * FROM tbl_employee";
MySqlCommand cmd = new MySqlCommand(query, Constring);
MySqlDataReader Reader;

try
{
    Constring.Open();
    Reader = cmd.ExecuteReader();
    while (Reader.Read())
    {
        string name = Reader.GetString("name");
        dataGridView1.Rows.Add(name);
    }
}
catch (Exception)
{
    throw;
}
Constring.Close();
0 Answers
Related