Export (0) Print
Expand All

Ewa.EwaControl.remove_commitCellEditing(function)

apps for Office and SharePoint

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


                      Ewa.EwaControl.remove_commitCellEditing(function);

function

The event handler to unsubscribe from the event.

The following code example shows how to unsubscribe the specified event handler for the [commitCellEditing] event. The code example assumes that you are working with an Excel Web Access Web Part on SharePoint Server 2013.

   
<script type="text/javascript">

var ewa = null;

// Add event handler for onload event.
if (window.attachEvent) {
    window.attachEvent("onload", ewaOnPageLoad);
}
else {
    window.addEventListener("DOMContentLoaded", ewaOnPageLoad, 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_commitCellEditing(ewaCommitCellEditing);

    // ...
} 


function ewaCommitCellEditing(rangeEditArgs) {
    // Handle the commitCellEditing event
} 


/* Given the preceding code, unsubscribe the cellChanged
event handler from the activeCellChanged event. */

function myFunction() {
    // Unubscribe the commitCellEditing event handler.
    ewa.remove_commitCellEditing(ewaCommitCellEditing);

    // ...
}

</script>


Community Additions

ADD
Show:
© 2014 Microsoft