How can I select all rows in a grid control?

Use SAPGUI Scripting via the statement "ApplyGUIScript". In VBScript you then set the "selectRows" property. Example:

   Set grid = session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell")

   grid.selectedRows = "0-" &  (grid.rowCount-1)