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

Represents the RadSheetEditorBase delegate command.

Definition

Namespace:Telerik.WinForms.Controls.Spreadsheet.Commands

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Type Parameters:

T

The RadSheetEditorBase.

Syntax:

C#
public class RadSheetEditorDelegateCommand<T> : RadSheetEditorCommandBase<T>, ICommand where T : RadSheetEditorBase

Inheritance: objectRadSheetEditorCommandBase<T>RadSheetEditorDelegateCommand<T>

Implements: ICommand

Inherited Members RadSheetEditorCommandBase<T>.CanExecute(object)RadSheetEditorCommandBase<T>.Execute(object)RadSheetEditorCommandBase<T>.OnCanExecuteChanged()RadSheetEditorCommandBase<T>.AssociatedSheetEditorRadSheetEditorCommandBase<T>.CanExecuteChanged

Constructors

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

C#
public RadSheetEditorDelegateCommand(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: RadSheetEditorCommandBase<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: RadSheetEditorCommandBase<T>.ExecuteOverride(object)