'Declaration Public Event ButtonToolClick As ButtonToolClickEventHandler
public event ButtonToolClickEventHandler ButtonToolClick
The event handler receives an argument of type ButtonToolClickEventArgs containing data related to this event. The following ButtonToolClickEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ColumnFilter | Returns the column filter associated with the current filtering operation. |
Handled (Inherited from System.ComponentModel.HandledEventArgs) | |
Tool | Returns the tool that was clicked. |
This event will fire for all tools that derive from FilterButtonTool, including those buttons that are created automatically for the registered Infragistics.Win.UltraWinGrid.SpecialFilterOperands. Marking this event as handled will prevent the default logic from being executed, which includes applying any filters to the associated column.
Imports Infragistics.Win.SupportDialogs.FilterUIProvider Private Sub ultraGridFilterUIProvider1_ButtonToolClick(ByVal sender As Object, ByVal e As ButtonToolClickEventArgs) Dim operandTool As FilterOperandTool = TryCast(e.Tool, FilterOperandTool) If operandTool IsNot Nothing AndAlso operandTool.Operand.Name = "Quarter1" Then ' Prevent the operand for "Quarter 1" from doing any filtering and notify the user as such e.Handled = True MessageBox.Show("You don't want Quarter 1; it's colder. Wait for a warmer quarter") End If End Sub
using Infragistics.Win.SupportDialogs.FilterUIProvider; private void ultraGridFilterUIProvider1_ButtonToolClick(object sender, ButtonToolClickEventArgs e) { FilterOperandTool operandTool = e.Tool as FilterOperandTool; if (operandTool != null && operandTool.Operand.Name == "Quarter1") { // Prevent the operand for "Quarter 1" from doing any filtering and notify the user as such e.Handled = true; MessageBox.Show("You don't want Quarter 1; it's colder. Wait for a warmer quarter"); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2