Thank you Dale! I was able to move your code around a bit and make it work for my needs. Most examples here seem to use the interactive way of selecting objects and I have to find a way to make it non-interactive.
I pasted some code that worked for me and maybe will help somebody searching for this. Also look at the example scripts in the previous comment. One interesting thing is that the Add method of the TransformObjectList wanted an object reference instead of a GUID. Well, that is interesting for me because I though GUID was enough. Note that some methods return a list and I just wanted an object, so there are some [0] hiding here and there.
# For testing, just get direct references to the mesh and surface
TargetSurface = rs.ObjectsByName('upper')[0]
# Deselect everything and turn the grips on
rs.UnselectAllObjects()
rs.EnableObjectGrips(TargetSurface)
# The number of grips = rs.SurfacePointCount()
GripCount = rs.ObjectGripCount(TargetSurface)
# Return the GUID of grip number 10 (for example)
rs.SelectObjectGrip(TargetSurface, 10)
SelectedGrip = rs.SelectedObjects(False, True)
# To add the grip to the TransformObjectList, it needs an ObjRef not GUID
GripReference = Rhino.DocObjects.ObjRef(SelectedGrip[0])
ObjectList = Rhino.Collections.TransformObjectList()
ObjectList.Add(GripReference)
# Transformation +20mm in Z direction
Direction = Rhino.Geometry.Vector3d(0.0, 0.0, 20.0)
Transform = Rhino.Geometry.Transform.Translation(Direction)
# Move the grip
TheGrip = ObjectList.GripArray()[0]
TheGrip.Move(Transform)
# Let the owner of the grip (surface?) know it was moved
GripOwner = ObjectList.GripOwnerArray()[0]
sc.doc.Objects.GripUpdate(GripOwner, True)
# May be needed, maybe not
sc.doc.Views.Redraw()
If you stumble on this post looking for a solution, there is another post below that looks promising. I could not figure out how to get a Rhino.Geometry.NurbsSurface object from an existing NURBS surface. If you find a way (without using an interactive dialog box) please post it. Thank you! However, the code above should also work.