I want to have a grid view on my form that when I click a button it will load some test data into the DataGridView.

The name is called grid in the properties. For some reason my DataTable is not being loaded into the DataGridView and thus will not show on my form.

Code:

```
private void button3_Click(object sender, EventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add("Dosage", typeof(int));
        table.Columns.Add("Drug", typeof(string));
        table.Columns.Add("Patient", typeof(string));
        table.Columns.Add("Date", typeof(DateTime));

        table.Rows.Add(25, "Indocin", "David", DateTime.Now);
        table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
        table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
        table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
        table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);

        DataGridView grid = new DataGridView();
        grid.DataSource = table;
    }

```

![enter image description here](https://i.stack.imgur.com/bjczQ.jpg)