Class OpenGridItem<T>
A view command that opens the selected items from the grid into a new layout context ( IModelLayoutDisplayer)
If the item has already been altered in the current context, it will be opened using the same IEntityUpdater context, if not it will be opened in an isolated new one.
See https://help.lemonedge.com/contexts/ for more informationInheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: LemonEdge.ClientCore.dll
Syntax
public class OpenGridItem<T> : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Type Parameters
Name | Description |
---|---|
T | The type of entity to open an item from |
Constructors
OpenGridItem(IRootController, IModelLayoutCommon, IOpenGridItemImplementor<T>, ILogger<OpenGridItem<T>>)
Creates a new OpenGridItem view command
Declaration
public OpenGridItem(IRootController root, IModelLayoutCommon owner, IOpenGridItemImplementor<T> view, ILogger<OpenGridItem<T>> logger)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | owner | The owning host for this command |
IOpenGridItemImplementor<T> | view | The grid implementation to open the selected items from |
ILogger<OpenGridItem<T>> | logger |
Properties
Description
A user friendly description of this command
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
Guid |
Overrides
Key
Indicates the command key to use for executing this from a keyboard command
Declaration
public override KeyboardKey Key { get; }
Property Value
Type | Description |
---|---|
KeyboardKey |
Overrides
ModifierKeys
Indicates the modifier keys to be used with Key when executing this command from the keyboard
Declaration
public override KeyboardModifierKeys ModifierKeys { get; }
Property Value
Type | Description |
---|---|
KeyboardModifierKeys |
Overrides
OverlayIconID
On some clients another image can be overlayed on the bottom right of the main icon (for indicating add, remove, etc)
This optional overlay image can be specified here, either a ImageType or ImageID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
Guid? |
Overrides
Title
The title of this command
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ToolTip
A user friendly tool tip for this command functionality, by default the Description
Declaration
public override string ToolTip { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
InternalCanExecute(object)
Returns true if there are any selected items in the grid
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
bool | True if there are any selected items in the grid |
Overrides
InternalExecuteAsync(object)
For each selected item in the grid the system opens the entity (or the related entity if OpenFromRelatedColumnName has a value) in a new layout
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
RemoveEventHandlersOnDispose()
Provides an inheriting command the opoortunity to remove any event handlers being listened to before this command is disposed
Declaration
protected override void RemoveEventHandlersOnDispose()