Are you doing this in VB or C#? It helps if you are more specific.
Ok first things first. The datagrid and the gridview are different controls. Imagine the gridview as a datagrid on steroids.
Also, this doesn't really have anything to do with ajax. Yes the gridview control uses javascript but you don't need to worry about that.
If it is a gridview you are using (which I recommend)then it's as easy as this.....
In vb
Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As GridViewPageEventArgs) _
Handles GridView1.PageIndexChanging
GridView1.PageIndex = e.NewPageIndex
End Sub
In c#
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
}
That should do it.
Obviously in c# you will have to add the handler to your gridview control. You can either do this by clicking on the event in your properties tab or manually change it in your designer file.
Good luck.