Priya,
Don't know whether it would work.
remove the object Creation of the Gridview.
You can manually pull down a gridview from toolbox
and bind it to datasource.
if name of gridview is gridview1 then
gridview1.DataSource=dataset;
gridview1.DataBind();
May be the object creation is the problem after all.
Happy Programming:-)