Interface INewGridItemImplementor<T>
An interface for a view to enable creating new items manually by the user.
This expands on the copying (ICopyGridItemImplementor<T>) capability by adding functionality to override certain behaviour when creating a new item from scratch
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: ClientCore.dll
Syntax
public interface INewGridItemImplementor<T> : ICopyGridItemImplementor<T>, IGrid
Type Parameters
Name | Description |
---|---|
T | The type of new entity to create |
Properties
PopulateNewFromLookupColumnName
Indicates when creating a new item the system should create a popup showing a selection of items from this property relationship on type T
, that will automatically be set for the new item
For each relationship entity selected the system will call the callback in the GetLookupIDsForNewItems(Func<IBaseEntity, Task>) function
Declaration
string PopulateNewFromLookupColumnName { get; }
Property Value
Type | Description |
---|---|
System.String |
PreventDuplicateLookupIDs
If PopulateNewFromLookupColumnName is set and this is true then the system will ensure that new items are only created for selected entities that there are no current existing items with those values too
In other words this prevents duplication of items in the collection that have the same value for the PopulateNewFromLookupColumnName property on entity type T
Declaration
bool PreventDuplicateLookupIDs { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
If a PopulateNewFromLookupColumnName is set, then the system will call this method to retrieve each selected entity for the new item(s).
A new item will be created for each selected item with the PopulateNewFromLookupColumnName property set to the selected items id value
Declaration
Task GetLookupIDsForNewItems(Func<IBaseEntity, Task> callBack)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IBaseEntity, System.Threading.Tasks.Task> | callBack | A callback to be invoked for each antity selected by the user for the new item(s) |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |