You can clone the original DataTable, and copy whatever rows you want to the cloned DataTable.
private DataTable CopyDataTable(DataTable dt, int index)
{
DataTable cloneDT = dt.Clone(); // Clone DataTable Structure
for (int i = index, j = index + 5; i < j; i++)
{
DataRow dr = dt.Rows[i];
cloneDT.Rows.Add(dr.ItemArray);
}
return cloneDT;
}
You can invoke the method like this:
GridView1.Datasource = CopyDataTable(dt, 0); // create new DataTable, with rows 0-4
GridView1.DataBind();
GridView1.Datasource = CopyDataTable(dt, 5); // create new DataTable, with rows 5-9
GridView1.DataBind();