Spread Windows Forms 11.0 Product Documentation
IsDescending Property (Top10FilterItem)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > Top10FilterItem Class : IsDescending Property
Gets or sets a boolean value that specifies whether numeric numbers are filtered in descending order.
Syntax
'Declaration
 
Public Property IsDescending As Boolean
'Usage
 
Dim instance As Top10FilterItem
Dim value As Boolean
 
instance.IsDescending = value
 
value = instance.IsDescending
public bool IsDescending {get; set;}
Example
This example sets the IsDescending property.
fpSpread1.Sheets[0].Cells[0, 1].Value = 30;
fpSpread1.Sheets[0].Cells[1, 1].Value = 15;
fpSpread1.Sheets[0].Cells[2, 1].Value = 10;
FarPoint.Win.Spread.Top10FilterItem top10filter = new FarPoint.Win.Spread.Top10FilterItem(true, 5, false);
top10filter.IsDescending = false;
FarPoint.Win.Spread.IRowFilter rowFilter = new FarPoint.Win.Spread.HideRowFilter(fpSpread1.ActiveSheet);
FarPoint.Win.Spread.FilterColumnDefinition fd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom);
fd.Filters.Add(top10filter);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, top10filter.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
fpSpread1.Sheets(0).Cells(0, 1).Value = 30
fpSpread1.Sheets(0).Cells(1, 1).Value = 15
fpSpread1.Sheets(0).Cells(2, 1).Value = 10
Dim top10filter As New FarPoint.Win.Spread.Top10FilterItem(True, 5, False)
top10filter.IsDescending = False
Dim rowFilter As New FarPoint.Win.Spread.HideRowFilter(fpSpread1.ActiveSheet)
Dim fd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom)
fd.Filters.Add(top10filter)
rowFilter.ColumnDefinitions.Add(fd)
fpSpread1.ActiveSheet.RowFilter = rowFilter
fpSpread1.ActiveSheet.AutoFilterColumn(1, top10filter.DisplayName, 0)
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
See Also

Reference

Top10FilterItem Class
Top10FilterItem Members