Spread for ASP.NET 9.0 Product Documentation
DisplayName Property (Top10FilterItem)
Example 


Gets the display name of the filter.
Syntax
'Declaration
 
Public Overrides ReadOnly Property DisplayName As String
'Usage
 
Dim instance As Top10FilterItem
Dim value As String
 
value = instance.DisplayName
public override string DisplayName {get;}
Example
This example gets the DisplayName property.
protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;

            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.Web.Spread.Top10FilterItem top10filter = new FarPoint.Web.Spread.Top10FilterItem(true, 5, false);
            FarPoint.Web.Spread.IRowFilter rowFilter = new FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView);
            FarPoint.Web.Spread.FilterColumnDefinition fd = new FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom);
            top10filter.DisplayAtTopOfList = true;
            fd.Filters.Add(top10filter);
            rowFilter.ColumnDefinitions.Add(fd);
            FpSpread1.ActiveSheetView.RowFilter = rowFilter;
            FpSpread1.ActiveSheetView.AutoFilterColumn(1, top10filter.DisplayName);
            FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced;
            ListBox1.Items.Add(top10filter.DisplayName.ToString());
        }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        End If
        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.Web.Spread.Top10FilterItem(True, 5, False)
        Dim rowFilter As New FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView)
        Dim fd As New FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom)
        top10filter.DisplayAtTopOfList = True
        fd.Filters.Add(top10filter)
        rowFilter.ColumnDefinitions.Add(fd)
        FpSpread1.ActiveSheetView.RowFilter = rowFilter
        FpSpread1.ActiveSheetView.AutoFilterColumn(1, top10filter.DisplayName)
        FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced
        ListBox1.Items.Add(top10filter.DisplayName.ToString())
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

Top10FilterItem Class
Top10FilterItem Members

 

 


Copyright © GrapeCity, inc. All rights reserved.