Purpose Select a grid row Solution Use the predefined VB function guinet.GridControl.SelectRowByValue specifying the cell content and the column id. If you know the row number, you may use guinet.GridControl.SelectRow Examples: CallVBAsync guinet.GridControl.SelectRowByValue "PALO ALTO" column:="VARIANT" or CallVBAsync guinet.GridControl.SelectRow 1 In some grid controls, it is necessary to use the "ClickCellByValue" function in order to select the given entry: CallVBAsync guinet.GridControl.ClickCellByValue "PALO ALTO" column:="VARIANT" |
InputScript // start transaction IH08 // Display the variant directory Enter "/17" // Select a particular variant CallVBAsync guinet.GridControl.SelectRowByValue "PALO ALTO" column:="VARIANT" Enter // Start the list display Enter "/8"
If the variant "PALO ALTO" is missing in the system, an error popup is displayed:
The popup does not indicate that the variant "PALO ALTO" is missing. It is good practice to handle such errors explicitely in the InputScript and show an error message which clearly indicates what is going wrong. In our case we can add the error popup in the InputScript and then terminate the script with our own error message: InputScript // start transaction IH08 // Display the variant directory Enter "/17" // Select a particular variant CallVBAsync guinet.GridControl.SelectRowByValue "PALO ALTO" column:="VARIANT" Enter // Error message
popup? // Start the list display Enter "/8"
|
Components |