Search Results for

    Show / Hide Table of Contents

    Class BaseGridController<T>

    The base generic grid controller which works with the IBaseGrid<T> view and displays an entity type as rows in the grid

    This is the main base controller for creating grids, and dynamically creating their columns, for any entity in the system. The BaseGridControllerAny<T> is used objects that are not entities inheriting from IBaseEntity

    Both this controller and the BaseDefaultSingleViewController<T> view have a similar mechanism for creating controls dynamically within the UI
    Inheritance
    System.Object
    ModelViewController
    BaseGridController
    BaseGridControllerAny<T>
    BaseGridController<T>
    AllItemsWithLabelController<T>
    EntitySetsController<T>
    InstrumentsController<T>
    ObjectEntitiesController<T>
    BaseGridAnyRelatedCollectionController<T>
    BaseGridCustomController<T>
    BaseGridRelatedCollectionController<SI, T>
    Implements
    IBaseGridController
    IModelViewController
    ICollectionExportable
    INewGridItemImplementor<T>
    ICopyGridItemImplementor<T>
    IGrid
    IDeleteGridItemImplementor<T>
    Inherited Members
    BaseGridControllerAny<T>.GetGridController(IBaseGrid<T>)
    BaseGridControllerAny<T>.CollectionType
    BaseGridControllerAny<T>.Descriptor
    BaseGridControllerAny<T>.CanEditRowItem(T)
    BaseGridControllerAny<T>.TrackItemChanges
    BaseGridControllerAny<T>.OnTrackedItemChanged(Object, String)
    BaseGridControllerAny<T>.RowPreviewColumns
    BaseGridControllerAny<T>.BulkUpdateMulltipleSelectedItemsOnEdit
    BaseGridControllerAny<T>.GridView
    BaseGridControllerAny<T>.GetGridSourceItems(IEnumerable<T>)
    BaseGridControllerAny<T>.AlterLoadedItems(IEnumerable<T>)
    BaseGridControllerAny<T>.Clear()
    BaseGridControllerAny<T>.CloseController()
    BaseGridControllerAny<T>.CurrentGridItems
    BaseGridControllerAny<T>.CurrentItems
    BaseGridControllerAny<T>.InitDisplay()
    BaseGridControllerAny<T>.ResetColumnsAndGroups(Boolean)
    BaseGridControllerAny<T>.DisplayUI()
    BaseGridControllerAny<T>.AutoSelectFirstRow
    BaseGridControllerAny<T>.LoadAdditionalColumns()
    BaseGridControllerAny<T>.Columns()
    BaseGridControllerAny<T>.AddCol(Int16, ControlDisplayInfoLight, EntityDescriptor)
    BaseGridControllerAny<T>.ColumnNames()
    BaseGridControllerAny<T>.PivotColumns(Int16)
    BaseGridControllerAny<T>.AddStandardColumns
    BaseGridControllerAny<T>.StandardColumnsUniqueGroupKey
    BaseGridControllerAny<T>.SelectedItemForSubViews
    BaseGridControllerAny<T>.UpdateNewItem(T)
    BaseGridControllerAny<T>.AlterQuery(QueryableExecuter<T>)
    BaseGridControllerAny<T>.ApplyGridSettingsToFilter(QueryableExecuter)
    BaseGridControllerAny<T>.ApplyPaging(QueryableExecuter)
    BaseGridControllerAny<T>.SetTotalCount(Int32)
    BaseGridControllerAny<T>.DefaultRowCount
    BaseGridControllerAny<T>.PagerRequired
    BaseGridControllerAny<T>.CurrentPageIndex
    BaseGridControllerAny<T>.TotalCount
    BaseGridControllerAny<T>.TotalPageCount
    BaseGridControllerAny<T>.Sortings
    BaseGridControllerAny<T>.Filters
    BaseGridControllerAny<T>.SetPageIndex(Int32)
    BaseGridControllerAny<T>.Redisplay()
    BaseGridControllerAny<T>.TrackResults(IEnumerable<T>)
    BaseGridControllerAny<T>.AlterColumnInfo(ControlDisplayInfo)
    BaseGridControllerAny<T>.UpdateColumnFromName(String)
    BaseGridControllerAny<T>.GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)
    BaseGridControllerAny<T>.TogglerZeroColumn
    BaseGridControllerAny<T>.IsZeroColumnColumnVisible(String)
    BaseGridControllerAny<T>.ToggleZeroColumns()
    BaseGridControllerAny<T>.UpdateAllZeroColumns()
    BaseGridControllerAny<T>.UpdateTransferColumnStatus()
    BaseGridControllerAny<T>.TransferColToggler
    BaseGridControllerAny<T>.CanDelete(T)
    BaseGridControllerAny<T>.CanCreateNew
    BaseGridControllerAny<T>.GetStandardExtraColumns(String)
    BaseGridControllerAny<T>.IDeleteGridItemImplementor<T>.Grid
    BaseGridControllerAny<T>.InitCommands(IList<ViewCommand>)
    BaseGridControllerAny<T>.ExcelExportCommand
    BaseGridControllerAny<T>.GetPublicToggleCommand()
    BaseGridControllerAny<T>.GetNewGridCommand()
    BaseGridControllerAny<T>.GetDeleteCommand()
    BaseGridControllerAny<T>.GetUpCommand()
    BaseGridControllerAny<T>.GetDownCommand()
    BaseGridControllerAny<T>.AllowColumnSelection
    BaseGridControllerAny<T>.AllowPublicToggleCommand
    BaseGridControllerAny<T>.AllowSearchCommand
    BaseGridControllerAny<T>.AllowXMLImportExport
    BaseGridControllerAny<T>.AllowMultipleSelect
    BaseGridControllerAny<T>.AllowExcelExport
    BaseGridControllerAny<T>.AllowSequencing
    BaseGridControllerAny<T>.AutoOpenNewItemInTab
    BaseGridControllerAny<T>.OpenFromRelatedColumnName
    BaseGridControllerAny<T>.PopulateNewFromLookupColumnName
    BaseGridControllerAny<T>.GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
    BaseGridControllerAny<T>.PreventDuplicateLookupIDs
    BaseGridControllerAny<T>.RemoveItems(IEnumerable<T>)
    BaseGridControllerAny<T>.AddItem(T)
    BaseGridController.ComboItemsClear
    BaseGridController.ColumnGroups()
    BaseGridController.DefaultColumnGroupIndexes
    BaseGridController.DefaultFrozenColumnCount
    BaseGridController.AllPossibleSearchColumns()
    BaseGridController.InternalFilter
    BaseGridController.ColumnSortings
    BaseGridController.ColumnFilters
    BaseGridController.SearchColumns
    BaseGridController.Search
    BaseGridController.SetOrdering(IEnumerable<QueryableSort>)
    BaseGridController.SetFilters(IEnumerable<QueryableFilter>)
    BaseGridController.SetSearch(String, IEnumerable<String>)
    BaseGridController.DefaultSearchColumn
    BaseGridController.BaseGridView
    BaseGridController.GetVisibleColumnNames()
    BaseGridController.OnlyExportGrid
    BaseGridController.OnlyExportFromQuery
    BaseGridController.Created
    BaseGridController.IGrid.GridItems
    ModelViewController.CurrentDisplayedItem
    ModelViewController.CanWrite
    ModelViewController.CheckIsLockedForCanWrite
    ModelViewController.View
    ModelViewController.InitAsync()
    ModelViewController.DisplayItem(Object)
    ModelViewController.ShouldDisplayItem(Object)
    ModelViewController.DisplayIfNull
    ModelViewController.RemoveHandlers(Object)
    ModelViewController.AddHandlers(Object)
    ModelViewController.RemoveCommand(ViewCommand)
    ModelViewController.RemoveCommands<OFType>()
    ModelViewController.InsertCommand(ViewCommand, Int32)
    ModelViewController.InsertCommand(ViewCommand, ViewCommand, ViewCommand)
    ModelViewController.Commands
    ModelViewController.UpdateAllCommands()
    ModelViewController.ContextHelpURL
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Views.Core
    Assembly: ClientCore.dll
    Syntax
    public abstract class BaseGridController<T> : BaseGridControllerAny<T>, IBaseGridController, IModelViewController, ICollectionExportable, INewGridItemImplementor<T>, ICopyGridItemImplementor<T>, IGrid, IDeleteGridItemImplementor<T> where T : IBaseEntity
    Type Parameters
    Name Description
    T

    An entity type inheriting from IBaseEntity

    Constructors

    BaseGridController(IBaseGrid<T>)

    Creates a new default grid view controller with the specified instance of a default grid view

    Declaration
    public BaseGridController(IBaseGrid<T> view)
    Parameters
    Type Name Description
    IBaseGrid<T> view

    The instance of the default grid view in the client application

    Properties

    AllowCopyCommand

    Indicates that by default selected entities can be copied by the user with the copy command

    Declaration
    public override bool AllowCopyCommand { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.AllowCopyCommand

    AllowDeleteCommand

    Indicates that by default selected entities can be deleted by the user with the delete command

    Declaration
    public override bool AllowDeleteCommand { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.AllowDeleteCommand

    AllowIDFilter

    If true indicates that the results of this grid can be altered by parameters of type DisplayableItemDescriptorForCollectionParams against the ItemParams

    The default is true, but is overridden for grids that display sub sets of information related to other items

    Declaration
    protected virtual bool AllowIDFilter { get; }
    Property Value
    Type Description
    System.Boolean

    AllowNewCommand

    Indicates that by default entities can be created by the user with the new command

    Declaration
    public override bool AllowNewCommand { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.AllowNewCommand

    AllowOpenCommand

    Indicates that by default selected entities can be opened by the user with the open command

    Declaration
    public override bool AllowOpenCommand { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.AllowOpenCommand

    CopyItemHelper

    Returns a standard CopyItemDescriptor<T> for the entity type T

    Declaration
    protected override ICopyItemHelper<T> CopyItemHelper { get; }
    Property Value
    Type Description
    ICopyItemHelper<T>
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.CopyItemHelper

    NewItemHelper

    Returns a standard NewItemDescriptor<T> for the entity type T

    Declaration
    protected override INewItemHelper<T> NewItemHelper { get; }
    Property Value
    Type Description
    INewItemHelper<T>
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.NewItemHelper

    OpenInSameContext

    Indicates that opening an item should always open in the same context. By default this is false

    Declaration
    public virtual bool OpenInSameContext { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    GetCopyGridCommand()

    Provdies the copy command required to open any entity in the system

    Declaration
    protected override ViewCommand GetCopyGridCommand()
    Returns
    Type Description
    ViewCommand

    The CopyGridItem<T> command

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.GetCopyGridCommand()

    GetCreationQuery()

    Returns the main intial query to return all entities of type T

    Includes any filtering requested from parameters of type DisplayableItemDescriptorForCollectionParams against the ItemParams if AllowIDFilter is true

    Also applies any paging required
    Declaration
    protected virtual QueryableExecuter<T> GetCreationQuery()
    Returns
    Type Description
    QueryableExecuter<T>

    The main intial query to return all entities of type T

    GetCurrentQuery()

    Returns the GetCreationQuery() for this entity type, with the AlterQuery(QueryableExecuter<T>) and ApplyGridSettingsToFilter(QueryableExecuter) applied

    Declaration
    public QueryableExecuter<T> GetCurrentQuery()
    Returns
    Type Description
    QueryableExecuter<T>

    The GetCreationQuery() for this entity type, with the AlterQuery(QueryableExecuter<T>) and ApplyGridSettingsToFilter(QueryableExecuter) applied

    GetGridSourceItems()

    Executes the query (GetCurrentQuery()) for the entities required in this grid, sets the total count (as it is different due to paging), and returns the results

    Declaration
    public override Task<IEnumerable<T>> GetGridSourceItems()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>>

    The result of executing the GetCurrentQuery() to return all the entities that should be displayed in this grid

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.GetGridSourceItems()

    GetInternalDescriptor()

    Returns the descriptor for the entity type T

    Declaration
    protected override EntityDescriptor GetInternalDescriptor()
    Returns
    Type Description
    EntityDescriptor

    The descriptor for the entity type T

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.GetInternalDescriptor()

    GetOpenGridCommand()

    Provdies the open command required to open any entity in the system

    Declaration
    protected override ViewCommand GetOpenGridCommand()
    Returns
    Type Description
    ViewCommand

    The OpenGridItem<T> command

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.GetOpenGridCommand()

    GetQueryForExcelResults()

    The query for the results to export from this grid is the same as those to display the items -> GetCurrentQuery()

    Declaration
    public override QueryableExecuter GetQueryForExcelResults()
    Returns
    Type Description
    QueryableExecuter

    The query for the results to export from this grid is the same as those to display the items -> GetCurrentQuery()

    Overrides
    BaseGridController.GetQueryForExcelResults()

    OnOpenRowItem(T)

    Opens the specified entity item in a new IModelLayoutDisplayer.

    Either opens the item itself, or a related item if OpenFromRelatedColumnName is populated

    Declaration
    public override Task OnOpenRowItem(T rowItem)
    Parameters
    Type Name Description
    T rowItem

    The specified item to open in a new IModelLayoutDisplayer

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<T>.OnOpenRowItem(T)

    Implements

    IBaseGridController
    IModelViewController
    ICollectionExportable
    INewGridItemImplementor<T>
    ICopyGridItemImplementor<T>
    IGrid
    IDeleteGridItemImplementor<T>

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.