'Declaration Public Delegate Sub BeforeRowFixedStateChangedEventHandler( _ ByVal sender As Object, _ ByVal e As BeforeRowFixedStateChangedEventArgs _ )
public delegate void BeforeRowFixedStateChangedEventHandler( object sender, BeforeRowFixedStateChangedEventArgs e )
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_BeforeRowFixedStateChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BeforeRowFixedStateChangedEventArgs) Handles UltraGrid1.BeforeRowFixedStateChanged Dim operation As String ' NewFixedState specifies whether the row is being fixed or unfixed. If e.NewFixedState Then operation = "fix" Else operation = "unfix" End If Dim r As DialogResult = MessageBox.Show(Me, "You are about to " & operation & _ " row with the first cell value of " _ & e.Row.Cells(0).Text & ". Continue?", _ "Confirm", MessageBoxButtons.YesNo) If DialogResult.Yes <> r Then ' Set Cancel to true to cancel the operation. e.Cancel = True End If End Sub Private Sub UltraGrid1_AfterRowFixedStateChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.AfterRowFixedStateChangedEventArgs) Handles UltraGrid1.AfterRowFixedStateChanged Dim operation As String ' You can find out whether the row was fixed or unfixed by using the ' Fixed property of the row. If e.Row.Fixed Then operation = "fixed" Else operation = "unfixed" End If MessageBox.Show(Me, "The row with the first cell value of " _ & e.Row.Cells(0).Text & " has been " & operation) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void UltraGrid1_BeforeRowFixedStateChanged(object sender, Infragistics.Win.UltraWinGrid.BeforeRowFixedStateChangedEventArgs e) { string operation; // NewFixedState specifies whether the row is being fixed or unfixed. if ( e.NewFixedState ) { operation = "fix"; } else { operation = "unfix"; } DialogResult r = MessageBox.Show( this, "You are about to " + operation + " row with the first cell value of " + e.Row.Cells[0].Text + ". Continue?", "Confirm", MessageBoxButtons.YesNo ); if ( DialogResult.Yes != r ) { // Set Cancel to true to cancel the operation. e.Cancel = true; } } private void UltraGrid1_AfterRowFixedStateChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFixedStateChangedEventArgs e) { string operation; // You can find out whether the row was fixed or unfixed by using the // Fixed property of the row. if ( e.Row.Fixed ) { operation = "fixed"; } else { operation = "unfixed"; } MessageBox.Show( this, "The row with the first cell value of " + e.Row.Cells[0].Text + " has been " + operation ); }
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