Aller au contenu principal
Version: Suivant

VP SET BINDING PATH

Historique
ReleaseModifications
19 R5Ajout

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

ParamètresTypeDescription
rangeObjObject->Objet plage
dataContextAttributeText->Name of the attribute to bind to 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.

In rangeObj, pass an object that is either a cell range or a combined range of cells.

  • 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

Set a data context and bind the firstName and lastName attribute to cells:

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