Class DeleteGridItem<T>
A view command that prompts a confirmation to the user then deletes the selected items in a grid from the current IEntityUpdater context and removes them from the grid
The pending change can be committed by the user executing the Save command
Inheritance
System.Object
DeleteGridItem<T>
Implements
System.IDisposable
System.Windows.Input.ICommand
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: ClientCore.dll
Syntax
public class DeleteGridItem<T> : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Type Parameters
| Name |
Description |
| T |
The type of entity in the grid
|
Constructors
DeleteGridItem(IModelLayoutDisplayer, IDeleteGridItemImplementor<T>)
Creates a new DeleteGridItem view command
Declaration
public DeleteGridItem(IModelLayoutDisplayer owner, IDeleteGridItemImplementor<T> controller)
Parameters
| Type |
Name |
Description |
| IModelLayoutDisplayer |
owner |
The owning context this command operates within, and the context it will delete the selected grid items from
|
| IDeleteGridItemImplementor<T> |
controller |
The grid implementation to remove selected items from
|
Properties
Description
Declaration
public override string Description { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
| Type |
Description |
| System.Guid |
|
Overrides
IncludeInSimple
Declaration
public override bool IncludeInSimple { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Key
Declaration
public override KeyboardKey Key { get; }
Property Value
Overrides
ModifierKeys
Declaration
public override KeyboardModifierKeys ModifierKeys { get; }
Property Value
Overrides
OverlayIconID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
| Type |
Description |
| System.Nullable<System.Guid> |
|
Overrides
Title
Declaration
public override string Title { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
Declaration
public override string ToolTip { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
Methods
InternalCanExecuteAsync(Object)
Returns true if there are selected items in the grid that the user has permissions to delete
Declaration
public override Task<bool> InternalCanExecuteAsync(object parameter)
Parameters
| Type |
Name |
Description |
| System.Object |
parameter |
The command parameter
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Boolean> |
True if there are selected items in the grid that the user has permissions to delete
|
Overrides
InternalExecuteAsync(Object)
Prompts for confirmation to delete the selected rows, then deletes them from the context (effectively adding them to pending changes of the context, the changes still need to be saved), and then removes them from the grid
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
| Type |
Name |
Description |
| System.Object |
parameter |
The command parameter
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
A task indicating the completion of the operation
|
Overrides
Implements
System.IDisposable
System.Windows.Input.ICommand
Extension Methods