OnPropertyChanged
Applies to: SharePoint Foundation 2010
In this article
Description
Arguments
Example
Description
Occurs when a record’s property is changed, including all user and programmatic edits.
Note
This event is not fired on any edits on an entry row.
Depending on the property type of this cell, this event may be fired multiple times for a single edit indicating validation changes.
Arguments
Arguments |
Description |
---|---|
recordKey |
The record key. |
fieldKey |
The field key. |
oldProp |
The old property. |
newProp |
The new property. |
propType |
Indicates the property type. |
changeKey |
Represents a change key. |
validationState |
ValidationState is a value from the SP.JsGrid.ValidationState enum. Possible values are: Valid, Pending, Invalid. |
Example
This code calls the GotHere function when a OnProperrtyChanged event is triggered.
<script type="text/javascript">
Type.registerNamespace("GridManager");
GridManager = function () {
this.Init = function (jsGridControl, initialData, props) {
control = jsGridControl;
var dataSource = new SP.JsGrid.StaticDataSource(initialData);
var jsGridParams = dataSource.InitJsGridParams();
// This event is triggered when a record’s property is changed, including all user and programmatic edits.
jsGridControl.AttachEvent(SP.JsGrid.EventType. OnProperrtyChanged, GotHere);
jsGridControl.Init(jsGridParams);
}
};
function GotHere(obj) {
alert('Got Here, ' + obj.fieldKey);
}
</script>
See Also
Concepts
Other Resources
JS Grid Control Functions