New to Telerik UI for WinFormsStart a free 30-day trial

Represents class that describes ICellEditor DelegateCommand.

Definition

Namespace:Telerik.WinForms.Controls.Spreadsheet.Commands

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Type Parameters:

T

The type of the T.

Syntax:

C#
public class CellEditorDelegateCommand<T> : CellEditorCommandBase<T>, ICommand where T : ICellEditor

Inheritance: objectCellEditorCommandBase<T>CellEditorDelegateCommand<T>

Implements: ICommand

Inherited Members CellEditorCommandBase<T>.CanExecute(object)CellEditorCommandBase<T>.Execute(object)CellEditorCommandBase<T>.OnCanExecuteChanged()CellEditorCommandBase<T>.AssociatedCellEditorCellEditorCommandBase<T>.CanExecuteChanged

Constructors

Initializes a new instance of the CellEditorDelegateCommand<T> class.

C#
public CellEditorDelegateCommand(T editor, Action<T, object> commandAction, Func<T, object, bool> canExecuteFunction = null)
Parameters:editorT

The editor.

commandActionAction<T, object>

The command action.

canExecuteFunctionFunc<T, object, bool>

The can execute function.

Methods

Defines the method that determines whether the command can execute in its current state.

C#
protected override bool CanExecuteOverride(object parameter)
Parameters:parameterobject

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns:

bool

true if this command can be executed; otherwise, false.

Overrides: CellEditorCommandBase<T>.CanExecuteOverride(object)

Defines the method to be called when the command is invoked.

C#
protected override void ExecuteOverride(object parameter)
Parameters:parameterobject

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Overrides: CellEditorCommandBase<T>.ExecuteOverride(object)