Saltar para o conteúdo principal
Versão: 20 R8

VP SET BINDING PATH

História
ReleaseMudanças
19 R5Adicionado

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

ParâmetroTipoDescrição
rangeObjObject->Objeto intervalo
dataContextAttributeText->Nome do atributo a associar a rangeObj

Descrição

The VP SET BINDING PATH command binds an attribute from a sheet's data context to rangeObj. Após definir um contexto de dados usando o método SET DATA CONTEXT. When loaded, if the data context contains the attribute, the value of dataContextAttribute is automatically displayed in the cells in rangeObj.

Em rangeObj, passe um objeto que seja um intervalo de células ou um intervalo combinado de células.

  • 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.

No dataContextAttribute, passe o nome do atributo para vincular a rangeObj. Se dataContextAttribute é uma string vazia, a função remove a vinculação atual.

Os atributos do tipo coleção não são suportados. Quando você passar o nome de uma coleção, o comando não faz nada.

Exemplo

Defina um contexto de dados e vincule o atributo firstName e lastName às células:

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")

Veja também

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