SpreadJS Documentation
RangeSorted Event
The sheet that triggered the event.
The sheet's name.
The index of the column that was automatically sorted.
Whether the automatic sort is ascending.
Occurs when a column has just been automatically sorted.
Syntax
var instance; // Type: Events
instance.RangeSorted = function(sheet, sheetName, col, ascending) { };
RangeSorted = function ( 
   sheet : Sheet,
   sheetName : string,
   col : number,
   ascending : boolean
) { };

Parameters

sheet
The sheet that triggered the event.
sheetName
The sheet's name.
col
The index of the column that was automatically sorted.
ascending
Whether the automatic sort is ascending.
Example
This example uses the RangeSorted event.
activeSheet.setValue(0, 0, 10);
activeSheet.setValue(1, 0, 100);
activeSheet.setValue(2, 0, 50);
activeSheet.setValue(3, 0, 40);
activeSheet.setValue(4, 0, 80);
activeSheet.setValue(5, 0, 1);
activeSheet.setValue(6, 0, 65);
activeSheet.setValue(7, 0, 20);
activeSheet.setValue(8, 0, 30);
activeSheet.setValue(9, 0, 35);
var cellrange =new GcSpread.Sheets.Range(0, 0, 5, 1);
var hideRowFilter =new GcSpread.Sheets.HideRowFilter(cellrange);
activeSheet.rowFilter(hideRowFilter);

$("#spreadContainer").data("spread").getActiveSheet().bind(GcSpread.Sheets.Events.RangeSorted, function (e, info) {    
        alert("Col (" + info.col + ", " + info.ascending +")");
});
See Also

Reference

Events type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.