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


GrapeCity.Xaml.SpreadSheet.UI Namespace > GcSpreadSheet Class : DragFillBlock Event
Occurs when the user drags to fill a range of cells.
Syntax
'Declaration
 
Public Event DragFillBlock As EventHandler(Of DragFillBlockEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of DragFillBlockEventArgs)
 
AddHandler instance.DragFillBlock, handler
public event EventHandler<DragFillBlockEventArgs> DragFillBlock
Event Data

The event handler receives an argument of type DragFillBlockEventArgs containing data related to this event. The following DragFillBlockEventArgs properties provide information specific to this event.

PropertyDescription
Gets the AutoFillType value used for the fill operation.  
(Inherited from System.ComponentModel.CancelEventArgs)
Gets the direction of the fill.  
Gets the range used for the fill operation.  
Example
This example uses the DragFillBlock event.
gcSpreadSheet1.CanUserDragFill = true;

private void gcSpreadSheet1_DragFillBlock(object sender, GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockEventArgs e)
        {
           listBox1.Items.Add(e.AutoFillType.ToString());
           listBox1.Items.Add(e.FillDirection.ToString());
           listBox1.Items.Add(e.FillRange.RowCount.ToString());
        }

private void gcSpreadSheet1_DragFillBlockCompleted(object sender, GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockCompletedEventArgs e)
        {
            listBox1.Items.Add(e.AutoFillType.ToString());
            listBox1.Items.Add(e.FillDirection.ToString());
            listBox1.Items.Add(e.FillRange.RowCount.ToString());
        }
GcSpreadSheet1.CanUserDragFill = True
    
Private Sub gcSpreadSheet1_DragFillBlock(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockEventArgs) Handles gcSpreadSheet1.DragFillBlock
        ListBox1.Items.Add(e.AutoFillType.ToString())
        ListBox1.Items.Add(e.FillDirection.ToString())
        ListBox1.Items.Add(e.FillRange.RowCount.ToString())
    End Sub

    Private Sub gcSpreadSheet1_DragFillBlockCompleted(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockCompletedEventArgs) Handles gcSpreadSheet1.DragFillBlockCompleted
        ListBox1.Items.Add(e.AutoFillType.ToString())
        ListBox1.Items.Add(e.FillDirection.ToString())
        ListBox1.Items.Add(e.FillRange.RowCount.ToString())
    End Sub
GcSpreadSheet1.CanUserDragFill = True
    
Private Sub gcSpreadSheet1_DragFillBlock(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockEventArgs) Handles gcSpreadSheet1.DragFillBlock
        ListBox1.Items.Add(e.AutoFillType.ToString())
        ListBox1.Items.Add(e.FillDirection.ToString())
        ListBox1.Items.Add(e.FillRange.RowCount.ToString())
    End Sub

    Private Sub gcSpreadSheet1_DragFillBlockCompleted(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.DragFillBlockCompletedEventArgs) Handles gcSpreadSheet1.DragFillBlockCompleted
        ListBox1.Items.Add(e.AutoFillType.ToString())
        ListBox1.Items.Add(e.FillDirection.ToString())
        ListBox1.Items.Add(e.FillRange.RowCount.ToString())
    End Sub
See Also