Hi,
In your source code of Grid, you must set the pagging property to "true" and call the page index method in code behind itself and rebind your grid in that method itself.
in source code:
AllowPaging="True" onpageindexchanged="gdDocument_PageIndexChanged" PageSize="50"
In code behind:
gdDocument.CurrentPageIndex = e.NewPageIndex;