It turns out that the code isn't working in the fashion I'm expecting - the for loop is reading based on the the RRN - not the order in which the grid is sorted by the end-user.
var myGrid = getObj("s1_items");
var gridrec = myGrid.grid.getRecordCount();
for (var i=1;i<=gridrec;i++) {
var rrn = myGrid.grid.getRRN(i);
myGrid.grid.setDataValue(rrn, "S1_SORTROW", i);
}