first create a dataset then in page_load event type this for windows application adapter1.Fill(dataset1,"employees"); dataGridView1.DataSource = dataset1.Tables["employees"] for web application gridview1.datasource=dataset1.Tables["employees"] gridview1.databind()
this is code maker