Aller au contenu principal
Version: 20 R6 BETA

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.

Attributes of type collection are not supported. When you pass the name of a collection attribute, the command does nothing.

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