QG_UpdateArea(areaRef; updateType; firstCell; lastCell):errorCode
areaRef Longint QGrid area reference
updateType Longint Type of update
firstCell Longint First cell index
lastCell Longint Last cell index
error Longint Error result

Trigger an update of the QGrid area content

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

Parameter updateType specifies the kind of update that will apply. QGrid defines the following constants for updateType:

qg_Update_Grid 2 Update everything in the grid
qg_Update_CellContents 8 Cell contents have changed

Pass qg_Update_Grid in updateType to update everything in the grid area. QGrid will re-evaluate the number of cells using the expression specified with QG_SetNumCells and will redraw the cells. Any existing user selection of cells will be deleted. Parameters firstCell and lastCell have no effect in this case and can be omitted.

Pass qg_Update_CellContents in updateType to refresh the grid area after changes affecting the content of the cell (picture or caption objects). Cells will be redrawn using the expressions specified with QG_SetCellPicture and QG_SetCellCaption, but their number will not be recalculated. Any existing user selection of grid cells will be preserved.

Optional parameters firstCell and lastCell can be used when the second update type is used, to specify the range of cells that will be updated (instead of the entire grid). When lastCell is not present, only the cell with index firstCell will be updated.


   // Reload all data and redraw the plug-in area.


$err:=QG_UpdateArea (xGrid;qg_Update_Grid)
   // Notify area xGrid that the contents of cells 13 to 20 have changed.



$err:=QG_UpdateArea (xGrid;qg_Update_CellContents;$startIndex;$endIndex)