OnCellEditCompleted

Applies to: SharePoint Foundation 2010

In this article
Description
Arguments
Example

JS Grid Control Events

Description

Occurs after the user has finished editing a cell with an edit control or widget. This event also occurs when the page is refreshed (an onLoad event).

Note

This event is not called in all cases when the contents of a cell have changed. For example, it is not called when the contents of a cell are changed programmatically.

Arguments

Argument

Description

recordKey

The key value of the record.

fieldKey

A value representing the field.

changeKey

A value representing the change key.

bCancelled

A Boolean representing if the event has been cancelled.

Example

This code calls the GotHere function when a OnCellEditCompleted 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 after the standard grid error checking
            jsGridControl.AttachEvent(SP.JsGrid.EventType.OnCellEditCompleted, GotHere);

            jsGridControl.Init(jsGridParams);
        }
    };
    function GotHere(obj) {
        alert('Got Here, ' + obj.fieldKey);

    }
</script>

See Also

Concepts

JsGrid Client Side Reference

JS Grid Control Delegates

JS Grid Enumeration

JS Grid Control Events

Other Resources

JS Grid Control Functions