ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.ColMove Event

Occurs whenever the user has finished moving 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 C1TrueDBGrid1_ColMove(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColMoveEventArgs) Handles C1TrueDBGrid1.ColMove

           e.Cancel = True

       End Sub

·      C#

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

       {

           e.Cancel = true;

       }

·      Delphi

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

       begin

         e.Cancel := True;

       end;

See Also

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


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