OnCellEditBegin
Applies to: SharePoint Foundation 2010
In this article
Description
Arguments
Example
Description
Occurs when the user begins editing (for example, by a keystroke or a double-click) with an edit control or widget, such as when the user begins typing in an edit box.
Note
This event is not called in all cases when a cell's contents change. For example, it is not called when a cell's contents are changed programmatically.
Arguments
None.
Example
This code calls the GotHere function when an OnCellEditBegin 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();
// Occurs when the user begins editing (for example, by a keystroke or a double-click).
jsGridControl.AttachEvent(SP.JsGrid.EventType. OnCellEditBegin, GotHere);
jsGridControl.Init(jsGridParams);
}
};
function GotHere(obj) {
alert('Got Here, ' + obj.fieldKey);
}
</script>
See Also
Concepts
Other Resources
JS Grid Control Functions