'Declaration Public Event ClickCellButton As CellEventHandler
public event CellEventHandler ClickCellButton
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. |
The cell argument returns a reference to an UltraGridCell object that can be used to set properties of, and invoke methods on, the cell whose button was clicked. You can use this reference to access any of the returned cell's properties or methods.
This event is generated when the user clicks a cell's button. A cell may be represented by a button or contain a button, based on its style.
This event is only generated for a cell whose column's Style property is set to 2 (StyleEditButton) or 7 (StyleButton).
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