OnDoubleClick

Applies to: SharePoint Foundation 2010

In this article
Description
Arguments
Example

JS Grid Control Events

Description

Occurs when the user double-clicks on the cell.

Arguments

Argument

Description

eventInfo

Event information.

context

Context is an enumeration value from ClickContext Enumeration.

recordKey

The recod key of the cell.

fieldKey

The field key of the cell.

Example

This code calls the GotHere function when a OnDoubleClick 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 the user double-clicks on the cell.
            jsGridControl.AttachEvent(SP.JsGrid.EventType. OnDoubleClick, GotHere);

            jsGridControl.Init(jsGridParams);
        }
    };
    function GotHere(obj) {
        alert('Double click, ' + 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