'Declaration Public Event BeforeRowFixedStateChanged As BeforeRowFixedStateChangedEventHandler
public event BeforeRowFixedStateChangedEventHandler BeforeRowFixedStateChanged
The event handler receives an argument of type BeforeRowFixedStateChangedEventArgs containing data related to this event. The following BeforeRowFixedStateChangedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from System.ComponentModel.CancelEventArgs) | |
NewFixedState | Returns the new fixed state of the row. If this property returns true then the user is attempting to fix the row. If it returns false then the user is attempting to unfix the row. To cancel the operation of fixing or unfixing the row set the Cancel property of the event args to true. |
Row | Returns the row the user is attempting to fix or unfix. The origianl fixed state of the row can be obtained using the UltraGridRow.Fixed property or querying the RowsCollection.FixedRows collection. The new state is provided by the NewFixedState property of this event args. To cancel the operation of fixing or unfixing the row set the Cancel property of the event args to true. |
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