ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBDropdown.ColMove Event

Occurs when the user has moved a column.

[Visual Basic]

Public Event ColMove As ColMoveEventHandler

[C#]

public event ColMoveEventHandler ColMove

[Delphi]

public property ColMove: ColMoveEventHandler read remove_ColMove write add_ColMove;

Remarks

The ColMoveEventArgs.Position property ranges from 0, which denotes the left edge, to the total number of columns, which denotes the right edge.

If the ColMoveEventArgs.Cancel property is set to True, no movement occurs. Selected columns always remain selected, regardless of the ColMoveEventArgs.Cancel setting.

Note: This event is only raised when the user moves the selected columns to a new location.

Example

The following code prevents row movement:

·      Visual Basic

       Private Sub C1TrueDBDropdown1_ColMove(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColMoveEventArgs) Handles C1TrueDBDropdown1.ColMove

           e.Cancel = True

       End Sub

·      C#

       private void c1TrueDBDropdown1_ColMove(object sender, C1.Win.C1TrueDBGrid.ColMoveEventArgs e)

       {

           e.Cancel = true;

       }

·      Delphi

       procedure C1TrueDBDropdown1_ColMove(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColMoveEventArgs);

       begin

           e.Cancel := True;

       end;

See Also

C1TrueDBDropdown Class | C1TrueDBDropdown Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.