Class NotificationsController
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class NotificationsController : BaseGridControllerAny<INotification>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<INotification>, ICopyGridItemImplementor<INotification>, IGrid, IDeleteGridItemImplementor<INotification>, ISearchController, IModelViewController
Constructors
NotificationsController(IBaseGrid<INotification>)
Declaration
public NotificationsController(IBaseGrid<INotification> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGrid<INotification> | view |
Properties
AllowDeleteCommand
Indicates the command to allow selected rows to be deleted by the user is included in the InitCommands(IList<ViewCommand>)
The default is false
Declaration
public override bool AllowDeleteCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
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
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
GetDeleteCommand()
Returns the command for deleting an item in the grid
Declaration
protected override ViewCommand GetDeleteCommand()
Returns
Type | Description |
---|---|
ViewCommand | The command for deleting an item in the grid |
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<INotification>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<INotification>> | 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 INotification 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
OnOpenRowItem(INotification)
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(INotification rowItem)
Parameters
Type | Name | Description |
---|---|---|
INotification | rowItem | The item to open by the system |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |