tags:

views:

274

answers:

1
        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

+1  A: 

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"];
Alfred Myers
wooot love :D (585 characters left)
Shahmir Javaid