New to Telerik UI for WinForms? Start a free 30-day trial

ICommand

Interface

Defines a spreadsheet command that can be checked for availability and invoked with an optional parameter.

Definition

Namespace:Telerik.WinForms.Controls.Spreadsheet.Commands

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public interface ICommand

Methods

Checks whether the command can run with the supplied parameter in its current state.

C#
bool CanExecute(object parameter)
Parameters:parameterobject

Input for the command's availability check, or null when none is required.

Returns:

bool

true if the command can run; otherwise, false.

Invokes the command using the supplied parameter.

C#
void Execute(object parameter)
Parameters:parameterobject

Input passed to the command's operation, or null when none is required.

Events

Raised by an implementation when command availability may have changed so consumers can call CanExecute(object) again. The built-in Spreadsheet command base classes do not raise this event automatically.

C#
event EventHandler CanExecuteChanged