Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Ewa.EwaControl.remove_activeCellChanged(function)

Last modified: June 08, 2011

Applies to: apps for SharePoint | SharePoint Server 2010

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

Ewa.EwaControl.remove_activeCellChanged(function);

function

The event handler to unsubscribe from the event.

The following code example shows how to unsubscribe the specified event handler for the [activeCellChanged] 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); 
}

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

function ewaApplicationReady()
{
    // Get a reference to the Excel Services Web Part.
    ewa = Ewa.EwaControl.getInstances().getItem(0);
    // Add an event handler for the 
    // active cell changed event.
    ewa.add_activeCellChanged(cellChanged);

    // ...
}

// Handle the active cell changed event.
function cellchanged(rangeArgs)
{    
    // ...
}


function myFunction()
{
    // Remove the cellChanged event handler.
    ewa.remove_activeCellChanged(cellchanged);

    // ...
}

</script>

Show:
© 2015 Microsoft