Reputation: 8004
con.Open();
MySqlDataAdapter adapter = new MySqlDataAdapter("SELECT * FROM `call`", con);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "call");
dataGridView1.DataSource = dataset;
dataGridView1.Update();
Here is the above code
It runs fine but there is nothing in the datagrid :(
Any help will be apreciated thanks
Upvotes: 3
Views: 589
Reputation: 6453
A DataGridView will not work when pointed to a DataSet. You have to point it to a DataTable
Change your code to:
dataGridView1.DataSource = dataset.Tables["call"];
Upvotes: 1