BeforeRenderObjectEvent.OnContextMenuHandler Property

Gets or sets the JavaScript code that is executed when the context menu is displayed. The code is cached on the client in the HTML page.

Namespace CrystalDecisions.Web.HtmlReportRender Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Syntax

'Declaration

Public Overrideable Property OnContextMenuHandler As String
public virtual string OnContextMenuHandler {get; set;}

Example

This example shows how to set OnContextMenuHandler.

'Declaration

    Private Sub SetOnContextMenuHandler()
      Dim JavaScriptCode As String = _
        "<script language="Javascript">alert('Calling OnContextMenuHandler')</script>"
      BeforeRenderObjectEvent1.OnContextMenuHandler = JavaScriptCode
    End Sub
    private void SetOnContextMenuHandler()
    {
      String javaScriptCode = 
        "<script language="Javascript">alert('Calling OnContextMenuHandler')</script>";
      beforeRenderObjectEvent.OnContextMenuHandler = javaScriptCode;
    }

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

BeforeRenderObjectEvent Class
BeforeRenderObjectEvent Members
CrystalDecisions.Web.HtmlReportRender Namespace