Suppose I have a DataGridView named datagrid1.
Now I want to bind the values of DataSet to the DataGridView then i have to use....
datagrid1.DataSource = ds.Tables[0];// where ds is the object of dataSet
datagrid1.DataBind();
Again I want to bind the values of DataGridviewto the DataSet then i have to use....
DataSet ds= ((DataTable)datagrid1.dataSource).DataSet