Spread WPF 15
GrapeCity.Windows.SpreadSheet.UI Namespace / GcSpreadSheet Class / CanUserUndo Property
Example


In This Topic
    CanUserUndo Property (GcSpreadSheet)
    In This Topic
    Gets or sets whether to allow the user to undo edit operations.
    Syntax
    'Declaration
     
    <DefaultValueAttribute(True)>
    <CategoryAttribute("Spread Workbook")>
    Public Property CanUserUndo As Boolean
    'Usage
     
    Dim instance As GcSpreadSheet
    Dim value As Boolean
     
    instance.CanUserUndo = value
     
    value = instance.CanUserUndo
    [DefaultValue(true)]
    [Category("Spread Workbook")]
    public bool CanUserUndo {get; set;}
    Example
    This example uses the CanUserUndo property.
    gcSpreadSheet1.CanUserUndo = true;
    
     private void button1_Click(object sender, RoutedEventArgs e)
            {
    GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupExtent group = new GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupExtent(3, 5);
    GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupUndoAction action = new GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupUndoAction(this.gcSpreadSheet1.ActiveSheet, group);
    this.gcSpreadSheet1.DoCommand(action);
    gcSpreadSheet1.Invalidate();
            }
    GcSpreadSheet1.CanUserUndo = True
    
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
            Dim group As New GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupExtent(3, 5)
            Dim action As New GrapeCity.Windows.SpreadSheet.UI.UndoRedo.RowGroupUndoAction(GcSpreadSheet1.ActiveSheet, group)
            GcSpreadSheet1.DoCommand(action)
            GcSpreadSheet1.Invalidate()
        End Sub
    See Also