Occurs when a column is using the Button or EditButton style and the user clicks a cell's button.
The event handler receives an argument of type CellEventArgs containing data related to this event. The following CellEventArgs properties provide information specific to this event.
Property | Description |
---|
Cell | Returns a reference to the cell of interest. |
Following code shows how one can use ClickCellButton event.
For an overview of how to handle events in Visual Basic or Visual C#, see
Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see
Consuming Events in the
.NET Framework Developer's Guide.
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button7.Click
' Set the column style to button. Button column style shows buttons in the cells
' of the column. When one of them is clicked upon, the UltraGrid will fire ClickCellButton
' event giving you a chance to handle it.
Me.UltraGrid1.DisplayLayout.Bands(0).Columns("CustomerID").Style = ColumnStyle.Button
End Sub
Private Sub UltraGrid1_ClickCellButton(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles ultraGrid1.ClickCellButton
' The UltraGrid fires CellClickButton when the user clicks the button in a cell
' you a chance to handle it.
Debug.WriteLine("Button in " & e.Cell.Value.ToString() & " cell was clicked.")
End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
private void button7_Click(object sender, System.EventArgs e)
{
// Set the column style to button. Button column style shows buttons in the cells
// of the column. When one of them is clicked upon, the UltraGrid will fire ClickCellButton
// event giving you a chance to handle it.
this.ultraGrid1.DisplayLayout.Bands[0].Columns["CustomerID"].Style = ColumnStyle.Button;
}
private void ultraGrid1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
// The UltraGrid fires CellClickButton when the user clicks the button in a cell
// you a chance to handle it.
Debug.WriteLine( "Button in " + e.Cell.Value.ToString( ) + " cell was clicked." );
}
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