ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.AllowDrag Property

Gets or sets a value indicating the ability to drag from the grid.

[Visual Basic]

Public Property AllowDrag As Boolean

[C#]

public bool AllowDrag {get;set;}

[Delphi]

public property AllowDrag: Boolean read get_AllowDrag write set_AllowDrag;

Remarks

If this property is set to True the user has the ability to drag from the grid. The dragging procedure must still be handled, though, by the developer.

Example

The following code uses the AllowDrag property to allow the user to drag from the grid:

·      Visual Basic

       Me.C1TrueDBGrid1.AllowDrag = True

·      C#

       this.c1TrueDBGrid1.AllowDrag = true;

·      Delphi

       Self.C1TrueDBGrid1.AllowDrag := True;

Note: In order for the user to be able to drag items from a grid and drop into another grid, the second grid must have its AllowDrop property sey to True. For example:

·      Visual Basic

       Me.C1TrueDBGrid2.AllowDrop = True

·      C#

       this.c1TrueDBGrid2.AllowDrop = true;

·      Delphi

       Self.C1TrueDBGrid2.AllowDrop := True;

For an example of drag and drop in the TrueDBGrid, see Tutorial 13 - Implementing Drag-and-Drop in C1TrueDBGrid.

See Also

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


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