Ewa.EwaControl.remove_activeSelectionChanged(function)

Applies to: apps for SharePoint | SharePoint Server 2010

Unsubscribes the specified event handler from the [activeSelectionChanged] event.

Ewa.EwaControl.remove_activeSelectionChanged(function);

Parameters

function

The event handler to unsubscribe from the event.

Return Value

None.

Example

The following code example shows how to unsubscribe the specified event handler from the [activeSelectionChanged] event.

<script type="text/javascript">

var ewa = null;

// Add event handler for onload event.
if (window.attachEvent) 
{ 
    window.attachEvent("onload", ewaOmPageLoad);    
} 
else 
{ 
    window.addEventListener("DOMContentLoaded", ewaOmPageLoad, false); 
}

// Add event handler for applicationReady event.
function ewaOnPageLoad()
{
    if (typeof (Ewa) != "undefined")
    {
        Ewa.EwaControl.add_applicationReady(ewaApplicationReady);
    }
    else
    {
        alert("Error - the EWA JS is not loaded.");
    }
    // ...
}

// Handle the applicationReady event.
function ewaApplicationReady()
{
    // Get a reference to the Excel Services Web Part.
    ewa = Ewa.EwaControl.getInstances().getItem(0);
    // Add an event handler for the 
    // active selection changed event.
    ewa.add_activeSelectionChanged(selectionChanged);

    // ...
}

function myFunction ()
{
    // Remove event handler from activeSelectionChanged.
    ewa.remove_activeSelectionChanged(selectionChanged);

    // ...
}

</script>

See Also

Reference

Ewa.EwaControl.add_activeSelectionChanged(function)

Ewa.EwaControl Object