QGrid Obsolete commands

QGObs_SetMainTable

QGObs_SetMainTable(areaRef; tableNum):errorCode
areaRef Longint QGrid area reference
tableNum Longint Main table number
error Longint Error result
Do not use this command in QGrid v1.1 or later

This QGrid v1.0 command is preserved in QGrid v1.1 for compatibility reasons.
It has been substituted by newer commands.


Sets a database table as the data source for a QGrid area. This table is called the grid area's main table.

QGrid uses the main table to determine how many cells the grid will contain: the current selection of the main table is reflected to the cells that are displayed. Cell contents may come from the main table or from related-one tables. You should inform the plug-in of any change in the current selection of the main table by caliing QG_UpdateArea method with qg_Update_Selection as the update type.

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

Parameter tableNum holds the table number of the area's main table.

Example

` use table Photos as the source table
 
C_LONGINT($theFile)
 
$theFile:=Table(->[Photos])
ALL RECORDS([Photos]) ` show all table records in the grid
 
$err:=QGObs_SetMainTable (xGrid;$theFile)
If ($err # qg_noErr)
  ` Handle the error
End if
 

Related commands

QG_SetNumCells Sets the 4D expression giving the grid size
QG_GetNumCells Returns the current grid size expression
QGObs_GetMainTable Returns the current 4D source table of a QGrid area (obsolete)

QGrid © Escape Information Services
Generated by QDoc 2.6 on Thu, 2 May 2002 00:33:08 +0300