Spread Windows Forms 9.0 Product Documentation
FilterBarClick Event
Example 


Occurs when the user presses the left mouse button in a filter bar cell.
Syntax
'Declaration
 
Public Event FilterBarClick As FilterBarClickEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As FilterBarClickEventHandler
 
AddHandler instance.FilterBarClick, handler
public event FilterBarClickEventHandler FilterBarClick
Event Data

The event handler receives an argument of type FilterBarEventArgs containing data related to this event. The following FilterBarEventArgs properties provide information specific to this event.

PropertyDescription
ButtonGets which mouse button has been pressed.  
CancelGets or sets whether to cancel default processing.  
ColumnGets the column index of the cell in filter bar that is clicked.  
ViewGets the view that contains the filter bar cell that is clicked.  
XGets the x-coordinate of the pointer position.  
YGets the y-coordinate of the pointer position.  
Example
This example uses the FilterBarClick event.
 fpSpread1.Sheets[0].AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar;

private void fpSpread1_FilterBarClick(object sender, FarPoint.Win.Spread.FilterBarEventArgs e)
        {
            listBox1.Items.Add(e.Button.ToString());
            listBox1.Items.Add(e.Cancel.ToString());
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.View.ToString());
            listBox1.Items.Add(e.X.ToString());
            listBox1.Items.Add(e.Y.ToString());
        }
FpSpread1.Sheets(0).AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.FilterBar

Private Sub FpSpread1_FilterBarClick(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.FilterBarEventArgs) Handles FpSpread1.FilterBarClick
        ListBox1.Items.Add(e.Button.ToString())
        ListBox1.Items.Add(e.Cancel.ToString())
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.View.ToString())
        ListBox1.Items.Add(e.X.ToString())
        ListBox1.Items.Add(e.Y.ToString())
    End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.