WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridTransactionCommand

    Show / Hide Table of Contents

    Class GridTransactionCommand

    Implements a collection of SyncfusionCommand objects that should all be executed together as one command when the Undo() or Redo() of a grid CommandStack is called.

    Inheritance
    System.Object
    SyncfusionCommand
    GridTransactionCommand
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridTransactionCommand : SyncfusionCommand
    Remarks

    The BeginTrans(String) of a CommandStack object will create a GridTransactionCommand object and redirect subsequent commands into the current GridTransactionCommand object until CommitTrans() is called.

    Constructors

    GridTransactionCommand(GridModelCommandManager)

    Initializes a new instance ofGridTransactionCommand class and associates it with a GridModelCommandManager.

    Declaration
    public GridTransactionCommand(GridModelCommandManager commandStack)
    Parameters
    Type Name Description
    GridModelCommandManager commandStack

    The GridModelCommandManager this command should be executed on.

    GridTransactionCommand(GridModelCommandManager, String)

    Initializes a new instance ofGridTransactionCommand class and associates it with a GridModelCommandManager and sets a description text.

    Declaration
    public GridTransactionCommand(GridModelCommandManager commandStack, string s)
    Parameters
    Type Name Description
    GridModelCommandManager commandStack

    The GridModelCommandManager this command should be executed on.

    System.String s

    The description text for this command.

    Properties

    Description

    Gets a description for the command.

    Declaration
    public override string Description { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SyncfusionCommand.Description

    Stack

    Gets a reference to the stack with all commands that belong to this transaction.

    Declaration
    public Stack Stack { get; }
    Property Value
    Type Description
    System.Collections.Stack

    Methods

    Execute()

    Executes the command.

    Declaration
    public override void Execute()
    Overrides
    SyncfusionCommand.Execute()

    Peek()

    Returns a reference to the latest command in the stack and leaves the command on the stack.

    Declaration
    public SyncfusionCommand Peek()
    Returns
    Type Description
    SyncfusionCommand

    A reference to the latest SyncfusionCommand command.

    Pop()

    Returns a reference to the latest command in the stack and removes the command from the stack.

    Declaration
    public SyncfusionCommand Pop()
    Returns
    Type Description
    SyncfusionCommand

    A reference to the latest SyncfusionCommand command.

    Push(SyncfusionCommand)

    Adds a new command to the current transaction.

    Declaration
    public void Push(SyncfusionCommand cmd)
    Parameters
    Type Name Description
    SyncfusionCommand cmd

    The Command.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved