SpreadJS 13
GC.Spread.Sheets Namespace / Events type / DragMerging Event
The sheet that triggered the event.
The sheet's name.
The range that will be merged.
A value that indicates whether the operation should be canceled.
In This Topic
    DragMerging Event
    In This Topic
    Occurs before user drag merge cells.
    Syntax
    var instance; // Type: Events
    instance.DragMerging = function(sheet, sheetName, mergeRange, cancel) { };
    DragMerging = function ( 
       sheet : Worksheet,
       sheetName : string,
       mergeRange : Range,
       cancel : bool
    ) { };

    Parameters

    sheet
    The sheet that triggered the event.
    sheetName
    The sheet's name.
    mergeRange
    The range that will be merged.
    cancel
    A value that indicates whether the operation should be canceled.
    Example
    //This example returns the row index.
    // Press Ctrl key to merge
    $(document).keydown(function (e) {
         if (e.keyCode === 17) {
             spread.options.allowUserDragMerge = true;
         }
    });
    $(document).keyup(function (e) {
         if (e.keyCode === 17) {
             spread.options.allowUserDragMerge = false;
         }
    });
    activeSheet.bind(GC.Spread.Sheets.Events.DragMerging, function (e, data) {
         var mergeRange = data.mergeRange;
         alert(mergeRange.row);
    });
    activeSheet.bind(GC.Spread.Sheets.Events.DragMerged, function (e, data) {
         var mergeRange = data.mergeRange;
         alert(mergeRange.row);
    });
    See Also

    Reference

    Events type