Example: sapgui_grid_clear_selection

The following example uses sapgui_grid_clear_selection to unselect rows so that different rows can be selected.

// Save the Grid ID in variable "GridID" to make the code more readable
// Select first row
sapgui_grid_select_rows("One row", 
sapgui_grid_clear_selection("", "{GridID}", LAST );
// Select three rows listed explicitly
sapgui_grid_select_rows("Three rows listed", 
        "1,3,5", LAST );
sapgui_grid_clear_selection("", "{GridID}", LAST );
// Select rows with combination of list and range syntax
sapgui_grid_select_rows("Six rows, listed and range", 
        "1,2,6-9", LAST );