Using a full postback or partial rendering, you can keep track of current page index before refreshing the gridview.
Or just update the row you just edited using the JavaScript.
You can also use
Callback[
^] to update the Gridview with data.
Just get the data of the current page index you are on, and refresh/update the grid!