GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class : DragDropBlockCompleted Event |
'Declaration Public Event DragDropBlockCompleted As System.EventHandler(Of DragDropBlockCompletedEventArgs)
'Usage Dim instance As GcSpreadSheet Dim handler As System.EventHandler(Of DragDropBlockCompletedEventArgs) AddHandler instance.DragDropBlockCompleted, handler
public event System.EventHandler<DragDropBlockCompletedEventArgs> DragDropBlockCompleted
The event handler receives an argument of type DragDropBlockCompletedEventArgs containing data related to this event. The following DragDropBlockCompletedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ColumnCount | Gets the column count of the cell range being dragged. |
Copy | Gets whether the source range is copied. |
CopyOption | Gets the CopyOption value for the drag and drop operation. |
FromColumn | Gets the column index of the top left cell of the source range (range being dragged). |
FromRow | Gets the row index of the top left cell of the source range (range being dragged). |
Insert | Gets whether the source range is inserted. |
RowCount | Gets the row count of the cell range being dragged. |
ToColumn | Gets the column index of the bottom right cell of the destination range (where selection is dropped). |
ToRow | Gets the row index of the top left cell of the destination range (where selection is dropped). |
gcSpreadSheet1.DragDropBlock += new EventHandler<DragDropBlockEventArgs>(gcSpread1_DragDropBlock); gcSpreadSheet1.DragDropBlockCompleted += new EventHandler<DragDropBlockCompletedEventArgs>(gcSpread1_DragDropBlockCompleted); void gcSpread1_DragDropBlock(object sender, DragDropBlockEventArgs e) { if (e.ToRow > 10 || e.ToColumn > 10) e.Cancel = true; } void gcSpread1_DragDropBlockCompleted(object sender, DragDropBlockCompletedEventArgs e) { if (e.Copy == true && e.Insert == true) MessageBox.Show("Copied insert action has been completed"); }
Private Sub GcSpreadSheet1_DragDropBlock(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.DragDropBlockEventArgs) If (e.ToRow > 10 Or e.ToColumn > 10) Then e.Cancel = True End If End Sub Private Sub GcSpreadSheet1_DragDropBlockCompleted(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.DragDropBlockCompletedEventArgs) If (e.Copy = True And e.Insert = True) Then MessageBox.Show("Copied insert action has been completed") End If End Sub
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6