SpreadJS Documentation
RangeGroupStateChanging Event
The sheet that triggered the event.
The sheet's name.
Whether the outline (range group) is a group of rows.
The index of the RangeGroupInfo object whose state is changing.
The level of the RangeGroupInfo object whose state is changing.
A value that indicates whether the operation should be canceled.
Occurs before the user changes the state of outline (range group) for rows or columns.
Syntax
var instance; // Type: Events
instance.RangeGroupStateChanging = function(sheet, sheetName, isRowGroup, index, level, cancel) { };
RangeGroupStateChanging = function ( 
   sheet : Sheet,
   sheetName : string,
   isRowGroup : boolean,
   index : number,
   level : number,
   cancel : boolean
) { };

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
isRowGroup
Whether the outline (range group) is a group of rows.
index
The index of the RangeGroupInfo object whose state is changing.
level
The level of the RangeGroupInfo object whose state is changing.
cancel
A value that indicates whether the operation should be canceled.
Example
This example uses the RangeGroupStateChanging event.
activeSheet.isPaintSuspended(true);
activeSheet.setRowCount(34);
activeSheet.setValue(0,0,"Western");
activeSheet.setValue(0,1,"Western");
activeSheet.setValue(0,2,"Western");
activeSheet.setValue(1,0,"A");
activeSheet.setValue(1,1,"B");
activeSheet.setValue(1,2,"C");
activeSheet.setValue(2,0,"A");
activeSheet.setValue(2,1,"B");
activeSheet.setValue(2,2,"C");
activeSheet.rowRangeGroup.group(0,2);
activeSheet.colRangeGroup.group(0,1);
activeSheet.isPaintSuspended(false);

$("#spreadContainer").data("spread").getActiveSheet().bind(GcSpread.Sheets.Events.RangeGroupStateChanging, function (e, info) {    
        alert("Level (" + info.level + ")");
});
See Also

Reference

Events type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.