OnRightClick
Applies to: SharePoint Foundation 2010
In this article
Description
Arguments
Example
Description
Occurs when the user right-clicks on the cell.
Arguments
Argument |
Description |
---|---|
eventInfo |
Information about the event. |
context |
Context is an enumeration value from ClickContext Enumeration. |
recordKey |
The record key. |
fieldKey |
The field key. |
Example
This code calls the GotHere function when a OnRightClick 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 right-clicks on the cell.
jsGridControl.AttachEvent(SP.JsGrid.EventType. OnRightClick, GotHere);
jsGridControl.Init(jsGridParams);
}
};
function GotHere(obj) {
alert('Got Here, ' + obj.fieldKey);
}
</script>
See Also
Concepts
Other Resources
JS Grid Control Functions