Aller au contenu principal
Version: 20 R10 BETA

VP SET BINDING PATH

Historique
ReleaseModifications
19 R5Ajout

VP SET BINDING PATH ( rangeObj : Object ; dataContextAttribute : Text)

ParamètresTypeDescription
rangeObjObject->Objet plage
dataContextAttributeText->Nom de l'attribut à lier à rangeObj

Description

The VP SET BINDING PATH command binds an attribute from a sheet's data context to rangeObj. After you set a data context using the SET DATA CONTEXT method. When loaded, if the data context contains the attribute, the value of dataContextAttribute is automatically displayed in the cells in rangeObj.

Dans rangeObj, passez un objet qui est soit une plage de cellules, soit une plage combinée de cellules.

  • If rangeObj is a range with several cells, the command binds the attribute to the first cell of the range.
  • If rangeObj contains several ranges of cells, the command binds the attribute to the first cell of each range.

In dataContextAttribute, pass the name of the attribute to bind to rangeObj. If dataContextAttribute is an empty string, the function removes the current binding.

Les attributs de type collection ne sont pas pris en charge. Lorsque vous passez le nom d'un attribut de collection, la commande ne fait rien.

Exemple

Définir un contexte de données et lier les attributs firstName et lastName aux cellules :

var $p : Object

$p:=New object
$p.firstName:="Freehafer"
$p.lastName:="Nancy"

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

VP SET BINDING PATH(VP Cell("ViewProArea"; 0; 0); "firstName")
VP SET BINDING PATH(VP Cell("ViewProArea"; 1; 0); "lastName")

Voir également

VP Get binding path
VP Get data context
VP SET DATA CONTEXT