Public
Snippet $9 authored by Jackson Romie

Code to Refresh Grid

file
! This is a catchall way to refresh the grid. 
! Keep in mind it clears the grid, then reloads the entire grid. 
! It is not as pretty as the way MAS handles inserts by default, but it works ! without causing business object out of sync with grid issues.
! This must happen in the UI object.
 
_OBJ'ClearGrid(GD_Lines.ctl) ! Clears the grid
_OBJ'LoadLines(GD_Lines.ctl) ! Loads the lines of the sales order
GD_Lines.ctl'CURRENTROW=cRowsHigh-1 ! sets the focus of the grid to the second to last row
                                    ! Which is the last real line
NEXT_ID=GD_Lines.ctl ! sets the control focus to the grid