Class AuditDataController
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class AuditDataController : BaseGridControllerAny<IAuditData>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<IAuditData>, ICopyGridItemImplementor<IAuditData>, IGrid, IDeleteGridItemImplementor<IAuditData>, ISearchController, IModelViewController
Constructors
AuditDataController(IBaseGrid<IAuditData>)
Declaration
public AuditDataController(IBaseGrid<IAuditData> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGrid<IAuditData> | view |
Properties
AllowOpenCommand
Indicates the command to allow selected rows to be opened by the user is included in the InitCommands(IList<ViewCommand>)
The default is false
Declaration
public override bool AllowOpenCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
ContextHelpURL
An optional associated url of a help file for the view this controller works with
Declaration
public override string ContextHelpURL { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
DefaultColumnGroupIndexes
Groupings for columns to be grouped by and items have aggregation summaries of
Declaration
public override IEnumerable<int> DefaultColumnGroupIndexes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<int> |
Overrides
OnlyExportGrid
Indicates when performing a stadard data export that the data should only be exported from the grid itself, and not re-run any query
The default is false
Declaration
public override bool OnlyExportGrid { get; }
Property Value
Type | Description |
---|---|
bool |
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
Columns()
Provides a list of all the columns to be created against the IBaseGrid<T> by this control
The default behaviour is to enumerate ColumnNames() and create the list automatically. You can also override AlterColumnInfo(ControlDisplayInfo) to provide more detail for specific columns
Alternatively you can override this to explicitly define themDeclaration
public override IEnumerable<ControlDisplayInfo> Columns()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfo> | A list of all the columns to be created against the IBaseGrid<T> by this control |
Overrides
GetGridSourceItems()
A function that must be implemented by inheriting classes that returns the list of items to be displayed against the grid given all active filters, sorting, searches, paging, etc
Declaration
public override Task<IEnumerable<IAuditData>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<IAuditData>> | A list of items to be displayed against the grid given all active filters, sorting, searches, paging, etc |
Overrides
GetOpenGridCommand()
Returns the command for opening the grid item.
Not implemented for this controller as the IAuditData may not be an entity type it knows how to open. Must be implemented by an inheriting controller.
Declaration
protected override ViewCommand GetOpenGridCommand()
Returns
Type | Description |
---|---|
ViewCommand | The command for opening the grid item. |
Overrides
InitCommands(IList<ViewCommand>)
Adds the following commands, if the associated AllowXXXCommand property returns true: A public toggle, multi-select row, open, column visiblitiy, transfer visible, search, view cancelled, view system, export, new, copy, move up/down, xml export, and delete commands
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
IList<ViewCommand> | commands | The initial set of commands for this view |
Overrides
OnOpenRowItem(IAuditData)
A method called by the system to open the specified data item from the grid
The defult implementation throws an error, this must be implemented by an inheriting controller if the AllowOpenCommand is true
Declaration
public override Task OnOpenRowItem(IAuditData rowItem)
Parameters
Type | Name | Description |
---|---|---|
IAuditData | rowItem | The item to open by the system |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |