Office.BindingDataChangedEventArgs interface
Proporciona información sobre el enlace que ha generado el evento DataChanged.
Comentarios
Usada por
Ejemplos
// When data in a binding changes, the handler receives a BindingDataChangedEventArgs object
// containing the binding that changed and the event type.
function addDataChangeHandler() {
Office.context.document.bindings.getByIdAsync("myBinding", function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
asyncResult.value.addHandlerAsync(Office.EventType.BindingDataChanged, onDataChanged);
}
});
}
function onDataChanged(eventArgs: Office.BindingDataChangedEventArgs) {
console.log("Event type: " + eventArgs.type);
console.log("Binding ID: " + eventArgs.binding.id);
// Refresh data from the binding
eventArgs.binding.getDataAsync( { coercionType: Office.CoercionType.Text }, function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
console.log("Updated data: " + asyncResult.value);
}
});
}
Propiedades
| binding | Obtiene un objeto Office.Binding que representa el enlace que generó el evento DataChanged. |
| type | Obtiene un valor de enumeración Office.EventType que identifica el tipo de evento que se generó. |
Detalles de las propiedades
binding
Obtiene un objeto Office.Binding que representa el enlace que generó el evento DataChanged.
binding: Binding;
Valor de propiedad
type
Obtiene un valor de enumeración Office.EventType que identifica el tipo de evento que se generó.
type: EventType;