I'm not sure my reply would help. Give it a try though. I guess you didn't associate the GridView.DataSource with a SqlDaSource or ObjectDataSource. That's why you need to handle the PageIndexChanging manually.
First, when you grab the data, attach it to the GridView. Then you save it to the this.Session, otherwise your datasource will be gone when the PageIndexChanging event gets fired. For example
GridView1.DataSource = new ModuleNameController().GetData(); // assuming GetData() returns a DataTable
this.Session["DataSource"] = GridView1.DataSource;
Then, you handle the PageIndexChanging
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.DataSource = (DataTable)this.Session["DataSource"];
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}
Happy programming