Version

ColumnMoving Event

This event is raised when the mouse moves while dragging a Column.
Syntax
'Declaration
 
Public Event ColumnMoving As EventHandler(Of ColumnMovingEventArgs)
public event EventHandler<ColumnMovingEventArgs> ColumnMoving
Event Data

The event handler receives an argument of type ColumnMovingEventArgs containing data related to this event. The following ColumnMovingEventArgs properties provide information specific to this event.

PropertyDescription
Column (Inherited from Infragistics.Controls.Grids.ColumnEventArgs)The ColumnEventArgs.Column that this event was triggered for.
DraggingHeader Gets a reference to the Infragistics.Controls.Grids.Primitives.HeaderCellControl that is visually being dragged.
Example
This sample demonstrates how to handle the ColumnMoving event which is fired when the mouse moves while dragging a column

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.

AddHandler Me.MyGrid.ColumnMoving, AddressOf MyGrid_ColumnMoving

Private Sub MyGrid_ColumnMoving(ByVal sender As System.Object, ByVal e As ColumnMovingEventArgs)
   System.Diagnostics.Debug.WriteLine("Column " + e.Column.Key.ToString() + " is being moved. The width of the header being dragged is " + e.DraggingHeader.Width.ToString)
End Sub
this.MyGrid.ColumnMoving += new EventHandler<ColumnMovingEventArgs>(MyGrid_ColumnMoving);

void MyGrid_ColumnMoving(object sender, ColumnMovingEventArgs e)
{
   System.Diagnostics.Debug.WriteLine("Column " + e.Column.Key + "  is being moved. \nThe width of the Header being dragged is "+e.DraggingHeader.Width);
}
<ig:XamGrid x:Name="MyGrid"  
    
ColumnMoving="MyGrid_ColumnMoving">         
</ig:XamGrid>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also