You need to specify the upper and lower limit for the results set you wish to display in each grid show...
for that purpose define three container variables (based upon your environment) and use them to query records to DB only those you require
example for ASP.Net environment will be somehow like this...
inside webpage define two hidden fields or add two values in session (based on your choice)
i.e
Class YourClass
{
int gridSize = 20;
public void Page_OnLoad(object sender, EventArgs e)
{
if ( (int)Session["LowerLimit"] == null))
Session["UpperLimit"] = gridSize; Session["LowerLimit"] = 0;
string yourCommand = "Select a.Col1, a.Col2, a.ColN From yourTable a
WHERE a.ID
BETWEEN" + Session["LowerLimit"] +
" AND " + Session["UpperLimit"];
}
}