QG_GetSelection

QG_GetSelection(areaRef; selectedCell; cellSelection):errorCode
areaRef Longint QGrid area reference
selectedCell Longint Selected cell index
cellSelection Array longint Selected cell indexes
error Longint Error result

Get the current user selection of grid cells.

Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.

When the qg_SelectOneCell selection option is in effect, parameter selectedCell receives the index of the selected cell and is set to zero (0) if no cell is currently selected. Array parameter cellSelection is ignored and can be omitted.

If the qg_SelectManyCells selection option is in effect, array parameter cellSelection receives the indexes of the user-selected cells while parameter selectedCell is set to zero. Array cellSelection is set to an empty array if no cells are currently selected.

Example

C_LONGINT($err;$selectedCell)
ARRAY LONGINT($cells;0)
 
$err:=QG_GetSelection (xGrid;$selectedCell;$cells)
If ($err # qg_noErr)
  ` Handle the error
End if
 

Related commands

QG_SetSelection Specifies the grid cells to select
QG_SetSelectionOptions Sets the user selection options for a QGrid area

QGrid © Escape
Generated by QDoc 2.8 on Thu, Oct 8, 2009 17:35:39