Version

ColumnDropped Event

This event is raised when a successful drag operation occurs while moving a Column.
Syntax
'Declaration
 
Public Event ColumnDropped As EventHandler(Of ColumnDroppedEventArgs)
public event EventHandler<ColumnDroppedEventArgs> ColumnDropped
Event Data

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

PropertyDescription
Column (Inherited from Infragistics.Controls.Grids.ColumnEventArgs)The ColumnEventArgs.Column that this event was triggered for.
DropType The type of operation that occured.
NewIndex The index of the column that resulted because of the move.
PreviousIndex The index of the column prior to the move.
Example
This topic demonstrates how to handle the ColumnDropped event which is fired when a column has been successfully moved to a new position.

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.ColumnDropped, AddressOf MyGrid_ColumnDropped
...
Private Sub MyGrid_ColumnDropped(ByVal sender As System.Object, ByVal e As ColumnDroppedEventArgs)
   System.Diagnostics.Debug.WriteLine("Column " + e.Column.Key.ToString + " successfully dropped from index " + e.PreviousIndex.ToString + " to " + e.NewIndex.ToString)
End Sub
this.MyGrid.ColumnDropped += new EventHandler<ColumnDroppedEventArgs>(MyGrid_ColumnDropped);
...
void MyGrid_ColumnDropped(object sender, ColumnDroppedEventArgs e)
{
   System.Diagnostics.Debug.WriteLine("Column "+e.Column.Key+" successfully dropped from index "+e.PreviousIndex+" to "+e.NewIndex);
}
<ig:XamGrid x:Name="MyGrid"   
    
ColumnDropped="MyGrid_ColumnDropped">
…            
</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