sapgui_grid_clear_selection

Grid Functions

Unselects all objects in a grid.

int sapgui_grid_clear_selection( const char *description, const char *gridID, [args,] LAST );
description User entered text to aid in understanding script
gridIDObject ID Strings
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

sapgui_grid_clear_selection unselects all selected cells, rows, and columns in a grid control.

Return Values

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure.

Parameterization

You can parameterize all string (char type) arguments.

Example

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
lr_save_string
    ("usr/cntlBCALVC_TOOLBAR_D100_C1/shellcont/shell",
    "GridID");
// Select first row
sapgui_grid_select_rows("One row", 
        "{GridID}", 
        "0", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui1023", 
        END_OPTIONAL);
sapgui_grid_clear_selection("", "{GridID}", LAST );
// Select three rows listed explicitly
sapgui_grid_select_rows("Three rows listed", 
        "{GridID}", 
        "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", 
        "{GridID}", 
        "1,2,6-9", LAST );