Spread for ASP.NET 9.0 Product Documentation
FilterString Property
Example 


Gets the filter string.
Syntax
'Declaration
 
Public ReadOnly Property FilterString As String
'Usage
 
Dim instance As AutoFilteredColumnEventArgs
Dim value As String
 
value = instance.FilterString
public string FilterString {get;}
Example
This example uses the AutoFilteredColumn event.
protected void Page_Load(object sender, EventArgs e)
   {
     FarPoint.Web.Spread.NamedStyle instyle = new FarPoint.Web.Spread.NamedStyle();
     FarPoint.Web.Spread.NamedStyle outstyle = new FarPoint.Web.Spread.NamedStyle();
     instyle.BackColor = System.Drawing.Color.Yellow;
     outstyle.BackColor = System.Drawing.Color.Gray;
     FarPoint.Web.Spread.StyleRowFilter rf = new FarPoint.Web.Spread.StyleRowFilter(FpSpread1.Sheets[0], instyle, outstyle);
     FpSpread1.Sheets[0].RowFilter = rf;
     // Assign filter and customize filter options
     FpSpread1.Sheets[0].RowFilter.AddColumn(1);
     FpSpread1.Sheets[0].RowFilter.ShowFilterIndicator = true;
     FpSpread1.Sheets[0].Cells[0, 1].Value = "test";
  }

protected void FpSpread1_AutoFilteringColumn(object sender, FarPoint.Web.Spread.FilteringEventArgs e)
  {
     FpSpread1.Sheets[0].Cells[0, 0].Text = e.FilterString;
     FpSpread1.Sheets[0].Cells[1, 0].Text = e.Col.ToString();
  }
protected void FpSpread1_AutoFilteredColumn(object sender, FarPoint.Web.Spread.FilteredEventArgs e)
  {
     FpSpread1.Sheets[0].Cells[0, 0].Text = e.FilterString;
     FpSpread1.Sheets[0].Cells[1, 0].Text = e.Col.ToString();
  }
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  Dim instyle As New FarPoint.Web.Spread.NamedStyle()
  Dim outstyle As New FarPoint.Web.Spread.NamedStyle()
  instyle.BackColor = Drawing.Color.Yellow
  outstyle.BackColor = Drawing.Color.Gray
  Dim rf As New FarPoint.Web.Spread.StyleRowFilter(FpSpread1.Sheets(0), instyle, outstyle)
  FpSpread1.Sheets(0).RowFilter = rf
  ' Assign filter and customize filter options
  FpSpread1.Sheets(0).RowFilter.AddColumn(1)
  FpSpread1.Sheets(0).RowFilter.ShowFilterIndicator = True
  FpSpread1.Sheets(0).Cells(0, 1).Value = "test"
End Sub

Protected Sub FpSpread1_AutoFilteringColumn(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.FilteringEventArgs) Handles FpSpread1.AutoFilteringColumn
    FpSpread1.Sheets(0).Cells(0, 0).Text = e.FilterString
    FpSpread1.Sheets(0).Cells(1, 0).Text = e.Col.ToString()
End Sub

Protected Sub FpSpread1_AutoFilteredColumn(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.FilteredEventArgs) Handles FpSpread1.AutoFilteredColumn
    FpSpread1.Sheets(0).Cells(0, 0).Text = e.FilterString
    FpSpread1.Sheets(0).Cells(1, 0).Text = e.Col.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

AutoFilteredColumnEventArgs Class
AutoFilteredColumnEventArgs Members

 

 


Copyright © GrapeCity, inc. All rights reserved.