Aller au contenu principal
Version: 20 R6 BETA

VP RESIZE TABLE

Historique
ReleaseModifications
19 R7Ajout

VP RESIZE TABLE ( rangeObj : Object; tableName : Text )

ParamètresTypeDescription
rangeObjObject->Nouvelle plage de la table
tableNameText->Nom de la table

Description

La commande VP RESIZE TABLE modifie la taille de la tableName par rapport à rangeObj.

Les règles suivantes s'appliquent :

  • Headers must remain in the same row and the resulting table range must overlap the original table range.
  • If the row count of the resized table is inferior to the initial row count, values inside cropped rows or columns are kept if they were not bound to a data context, otherwise they are deleted.
  • If the table expands on cells containing data:
    • if rows are added, data is deleted,
    • if columns are added, data are kept and are displayed in new columns.

If tableName does not exist, nothing happens.

Exemple

Vous créez une table avec un contexte de données :

var $context : Object
$context:=New object()

$context.col:=New collection
$context.col.push(New object("name"; "Smith"; "salary"; 10000))
$context.col.push(New object("name"; "Wesson"; "salary"; 50000))
$context.col.push(New object("name"; "Gross"; "salary"; 10500))

VP SET DATA CONTEXT("ViewProArea"; $context)

VP CREATE TABLE(VP Cells("ViewProArea"; 1; 1; 3; 3); "PeopleTable"; "col")

You want to add one column before and after the table as well as two empty rows. Vous pouvez écrire :

VP RESIZE TABLE(VP Cells("ViewProArea"; 0; 1; 4; 6); "PeopleTable")

Voir également

VP CREATE TABLE
VP Get table range