SpreadJS Documentation
Top10Condition Constructor
The condition type for the rule.
The rank of the rule.
The cell ranges for the condition. The array item type is GcSpread.Sheets.Range.
Represents a top 10 condition with the specified type and rank, for the specified cell ranges.
Syntax
var instance = new GcSpread.Sheets.Top10Condition(type, rank, ranges);
function Top10Condition( 
   type : GcSpread.Sheets.Top10ConditionTypetype,
   rank : number,
   ranges : Array
) : Top10Condition;

Parameters

type
The condition type for the rule.
rank
The rank of the rule.
ranges
The cell ranges for the condition. The array item type is GcSpread.Sheets.Range.
Example
This example uses a condition with a filer.
activeSheet.isPaintSuspended(true);
for (var row = 0; row < 25; row++) {
    activeSheet.setValue(row, 0, row, GcSpread.Sheets.SheetArea.viewport);
}
var rowFilter = new GcSpread.Sheets.HideRowFilter(new GcSpread.Sheets.Range(0, 0, 25, 1));
activeSheet.rowFilter(rowFilter);
var top10Con = new GcSpread.Sheets.Top10Condition(GcSpread.Sheets.Top10ConditionType.Top, 10);
var filter = activeSheet.rowFilter();
filter.addFilterItem(0, top10Con);
filter.filter(0);
activeSheet.isPaintSuspended(false);
See Also

Reference

Top10Condition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.