Try this...
Gridview data in dataset
DataSet ds = (DataSet)Gridview1.DataSource;
Get data from database and populate to gridview
SqlConnection con = new SqlConnection(connectionString);
con.Open();
SqlDataReader rd;
SqlCommand cmd = new SqlCommand("Select * from tablename", con);
rd = cmd.ExecuteReader();
GridView1.DataSource = rd;
GridView1.DataBind();
rd.Close();
con.Close();
In aspx page
<asp:gridview id="GridView1" runat="server" xmlns:asp="#unknown">
</asp:gridview>
Hope this helps.
cheers