GrapeCity.Xaml.SpreadSheet.UI
DragDropBlockCompleted Event (GcSpreadSheet)
Example 


Occurs at the completion of the user dragging and dropping a range of cells.
Syntax
'Declaration
 
Public Event DragDropBlockCompleted As EventHandler(Of DragDropBlockCompletedEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of DragDropBlockCompletedEventArgs)
 
AddHandler instance.DragDropBlockCompleted, handler
public event EventHandler<DragDropBlockCompletedEventArgs> DragDropBlockCompleted
Event Data

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.

PropertyDescription
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).  
Example
This example uses the DragDropBlockCompleted event.
private void gcSpreadSheet1_DragDropBlock(object sender, GrapeCity.Xaml.SpreadSheet.UI.DragDropBlockEventArgs e)
        {
            if (e.ToRow > 10 || e.ToColumn > 10)
                e.Cancel = true; 
        }

        private void gcSpreadSheet1_DragDropBlockCompleted(object sender, GrapeCity.Xaml.SpreadSheet.UI.DragDropBlockCompletedEventArgs e)
        {
            if (e.Copy == true && e.Insert == true)
                listBox1.Items.Add("Copied insert action has been completed");                   
         }
Private Sub gcSpreadSheet1_DragDropBlock(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragDropBlockEventArgs) Handles gcSpreadSheet1.DragDropBlock
        If (e.ToRow > 10 Or e.ToColumn > 10) Then
            e.Cancel = True
        End If
    End Sub

    Private Sub gcSpreadSheet1_DragDropBlockCompleted(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragDropBlockCompletedEventArgs) Handles gcSpreadSheet1.DragDropBlockCompleted
        If (e.Copy = True And e.Insert = True) Then
            listBox1.Items.Add("Copied insert action has been completed")
        End If
    End Sub
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options