Ya,
Create a function in class like,
public void GV_Paging(GridViewPageEventArgs e, DataTable dt, GridView gvOrders)
{
gvOrders.PageIndex = e.NewPageIndex;
gvOrders.DataSource = dt.DefaultView;
gvOrders.DataBind();
}
And call this function on PageIndexChanging event of Gridview in your code page like,
cmn.GV_Paging(e, dt, gvOrders);
Where cmn : object of class
dt : datasource of your gridview
gvOrders : Id of Gridview