Class InstrumentsController<T>
An optional base instrument entity controller used for displaying a collection of entities that inherit from IInstrumentBase in a consistent manner
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientCore.dll
Syntax
public abstract class InstrumentsController<T> : BaseGridController<T>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<T>, ICopyGridItemImplementor<T>, IGrid, IDeleteGridItemImplementor<T>, ISearchController, IModelViewController where T : IInstrumentBase
Type Parameters
Name | Description |
---|---|
T | The instrument entity type that inherits from IInstrumentBase |
Constructors
InstrumentsController(IBaseGrid<T>)
Creates a new InstrumentController
Declaration
public InstrumentsController(IBaseGrid<T> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGrid<T> | view | The IBaseGrid view implementation using the UI components of the client application |
Properties
AutoOpenNewItemInTab
Indicates when creating a new item in the grid that it should automatically be opened in a new tab as well
The default is true if the type T is an entity that is not a IsStandingDataEntity
Declaration
public override bool AutoOpenNewItemInTab { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
DefaultSearchColumn
The name of the column to use in the default search of text in the grid
Declaration
protected override string DefaultSearchColumn { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
AlterColumnInfo(ControlDisplayInfo)
Provides an inheriting controller the opportunity to alter the specified column before it is added to the IBaseGrid<T>
This is used in conjunction with columns defined via ColumnNames(), rather than Columns() which explicitly defines all information
The default operation provides a CustomComboItems if the column is against a property that is a link to an entity type (IsEntityLink)Declaration
protected override void AlterColumnInfo(ControlDisplayInfo info)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | info | The definition of the column that can be updated before being created in the IBaseGrid<T> |
Overrides
AlterQuery(QueryableExecuter<T>)
Alters the collection of instruments to be sorted by Name
Declaration
protected override QueryableExecuter<T> AlterQuery(QueryableExecuter<T> query)
Parameters
Type | Name | Description |
---|---|---|
QueryableExecuter<T> | query | The query executed to return all instruments to be displayed |
Returns
Type | Description |
---|---|
QueryableExecuter<T> | The query executed to return all instruments to be displayed |
Overrides
ColumnNames()
Adds the Name, CurrencyID, OwningEntityID, and AllowUnmapped as columns to the view
Declaration
protected override IEnumerable<ControlDisplayInfoLight> ColumnNames()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfoLight> | The columns to be added against this grid |