Spread Windows Forms 12.0 Product Documentation
AllowDragDrop Property (SpreadView)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SpreadView Class : AllowDragDrop Property
Gets or sets whether to allow the user to drag and drop a range of cells in the view.
Syntax
'Declaration
 
Public Property AllowDragDrop As Boolean
'Usage
 
Dim instance As SpreadView
Dim value As Boolean
 
instance.AllowDragDrop = value
 
value = instance.AllowDragDrop
public bool AllowDragDrop {get; set;}

Property Value

Boolean: true to allow the user to drag and drop data; false otherwise
Remarks

This property determines whether the user can copy or move a selected range of cells by dragging them to a new location in the same spreadsheet. When this property is set to true, the user can move or copy the contents of a cell or a range of cells using the drag-and-drop operation.

To move the contents of a cell or cells, the user selects the cell or range of cells, moves the pointer over the edge of the selection until the specified pointer appears, and then drags and drops the selection. To copy the contents of a cell or cells, the user selects the cell or range of cells, moves the pointer over the edge of the selection until the specified pointer appears, presses the Control (Ctrl) key, and then drags and drops the selection.

When this property is set to true and the user performs a drag-and-drop operation and releases the mouse button, the DragDropBlock event occurs.

When this property is set to true, if the OperationMode property is set to (2- Row Mode) and the user drags and drops a cell or range of cells, the entire row or rows containing the selected cell or range of cells are dragged and dropped.

The AllowDragDrop property is not supported with grouping.

Example
This example sets the AllowDragDrop property.
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
sv.AllowDragDrop = true;        
Dim sv As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook
sv.AllowDragDrop = True
See Also

Reference

SpreadView Class
SpreadView Members

User-Task Documentation

Using Drag Operations to Fill Cells