Search Results for

    Show / Hide Table of Contents

    Class BaseGridRelatedAnyCollectionController<TSingleItem, TCollection>

    The base generic grid controller which works with the IBaseGridRelatedCollection<TParentSingleItem, TCollection> view and displays an object type as rows in the grid that are all related to an other entity

    This is the main base controller for creating grids, and dynamically creating their columns, for any object in the system that is related to another entity. It is different from BaseGridRelatedCollectionController<TSingleItem, TCollection> as that only displays entities, and BaseGridControllerAny<T> as that can have multiple different types of parent it is related to where as this must be of type TSingleItem

    Both this controller and the BaseDefaultSingleViewController<T> view have a similar mechanism for creating controls dynamically within the UI
    Inheritance
    object
    ModelViewController
    BaseGridController
    BaseGridControllerAny<TCollection>
    BaseGridRelatedAnyCollectionController<TSingleItem, TCollection>
    AlgorithmRunStepItemsController
    AllocationPathAllocationsController
    CanvasItemsController
    TransactionPivottedValuesController
    PackageSelectorGridController
    Implements
    IBaseGridController
    ICollectionExportable
    INewGridItemImplementor<TCollection>
    ICopyGridItemImplementor<TCollection>
    IGrid
    IDeleteGridItemImplementor<TCollection>
    ISearchController
    IModelViewController
    Inherited Members
    BaseGridControllerAny<TCollection>.CanDelete(TCollection)
    BaseGridControllerAny<TCollection>.Clear()
    BaseGridControllerAny<TCollection>.CloseController()
    BaseGridControllerAny<TCollection>.Redisplay()
    BaseGridControllerAny<TCollection>.GetGridController(IBaseGrid<TCollection>)
    BaseGridControllerAny<TCollection>.GetInternalDescriptor()
    BaseGridControllerAny<TCollection>.CanEditRowItem(TCollection)
    BaseGridControllerAny<TCollection>.CanEditRowItem(TCollection, short)
    BaseGridControllerAny<TCollection>.OnTrackedItemChanged(object, string)
    BaseGridControllerAny<TCollection>.GetGridSourceItems()
    BaseGridControllerAny<TCollection>.GetGridSourceItems(IEnumerable<TCollection>, QueryableExecuterApplyType)
    BaseGridControllerAny<TCollection>.AlterLoadedItems(IEnumerable<TCollection>)
    BaseGridControllerAny<TCollection>.LoadExtendedItem(Type, object)
    BaseGridControllerAny<TCollection>.InitDisplay()
    BaseGridControllerAny<TCollection>.ResetColumnsAndGroups(bool)
    BaseGridControllerAny<TCollection>.DisplayUI()
    BaseGridControllerAny<TCollection>.GetItemToReselect(object)
    BaseGridControllerAny<TCollection>.LoadAdditionalColumns()
    BaseGridControllerAny<TCollection>.Columns()
    BaseGridControllerAny<TCollection>.AddCol(short, ControlDisplayInfoLight, EntityDescriptor)
    BaseGridControllerAny<TCollection>.ColumnNames()
    BaseGridControllerAny<TCollection>.PivotColumns(short)
    BaseGridControllerAny<TCollection>.ApplyGridSettingsToFilter(QueryableExecuter)
    BaseGridControllerAny<TCollection>.ApplyPaging(QueryableExecuter)
    BaseGridControllerAny<TCollection>.SetTotalCount(int)
    BaseGridControllerAny<TCollection>.SetPageIndex(int)
    BaseGridControllerAny<TCollection>.TrackResults(IEnumerable<TCollection>)
    BaseGridControllerAny<TCollection>.AlterColumnInfo(ControlDisplayInfo)
    BaseGridControllerAny<TCollection>.UpdateColumnFromName(string)
    BaseGridControllerAny<TCollection>.GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)
    BaseGridControllerAny<TCollection>.IsZeroColumnColumnVisible(string)
    BaseGridControllerAny<TCollection>.ToggleZeroColumns()
    BaseGridControllerAny<TCollection>.UpdateAllZeroColumns()
    BaseGridControllerAny<TCollection>.UpdateTransferColumnStatus()
    BaseGridControllerAny<TCollection>.OnSelectedItemsChanged(IEnumerable<TCollection>)
    BaseGridControllerAny<TCollection>.GetStandardExtraColumns(string)
    BaseGridControllerAny<TCollection>.ReApply()
    BaseGridControllerAny<TCollection>.InitCommands(IList<ViewCommand>)
    BaseGridControllerAny<TCollection>.GetPublicToggleCommand()
    BaseGridControllerAny<TCollection>.GetOpenGridCommand()
    BaseGridControllerAny<TCollection>.GetNewGridCommand()
    BaseGridControllerAny<TCollection>.GetCopyGridCommand()
    BaseGridControllerAny<TCollection>.GetDeleteCommand()
    BaseGridControllerAny<TCollection>.DeleteCommandIsQuickAccess()
    BaseGridControllerAny<TCollection>.GetUpCommand()
    BaseGridControllerAny<TCollection>.GetDownCommand()
    BaseGridControllerAny<TCollection>.MoveItemSequence(object, object)
    BaseGridControllerAny<TCollection>.OnOpenRowItem(TCollection)
    BaseGridControllerAny<TCollection>.GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
    BaseGridControllerAny<TCollection>.RemoveItems(IEnumerable<TCollection>)
    BaseGridControllerAny<TCollection>.AddItem(TCollection)
    BaseGridControllerAny<TCollection>.ToggleSearch(bool)
    BaseGridControllerAny<TCollection>.CollectionType
    BaseGridControllerAny<TCollection>.Descriptor
    BaseGridControllerAny<TCollection>.ListenToChanges
    BaseGridControllerAny<TCollection>.RowPreviewColumns
    BaseGridControllerAny<TCollection>.GridView
    BaseGridControllerAny<TCollection>.CurrentGridItems
    BaseGridControllerAny<TCollection>.CurrentItems
    BaseGridControllerAny<TCollection>.AutoSelectFirstRow
    BaseGridControllerAny<TCollection>.AddStandardColumns
    BaseGridControllerAny<TCollection>.StandardColumnsUniqueGroupKey
    BaseGridControllerAny<TCollection>.DefaultRowCount
    BaseGridControllerAny<TCollection>.DefaultOrOverridenRowCount
    BaseGridControllerAny<TCollection>.UserOverridenPagingAmount
    BaseGridControllerAny<TCollection>.PagerRequired
    BaseGridControllerAny<TCollection>.TotalCount
    BaseGridControllerAny<TCollection>.LimitPagesToTotal
    BaseGridControllerAny<TCollection>.TotalPageCount
    BaseGridControllerAny<TCollection>.Sortings
    BaseGridControllerAny<TCollection>.Filters
    BaseGridControllerAny<TCollection>.ShowCheckboxForMultiSelect
    BaseGridControllerAny<TCollection>.TogglerZeroColumn
    BaseGridControllerAny<TCollection>.TransferColToggler
    BaseGridControllerAny<TCollection>.ItemRowColorProperty
    BaseGridControllerAny<TCollection>.CanCreateNew
    BaseGridControllerAny<TCollection>.SelectedItemForSubViews
    BaseGridControllerAny<TCollection>.ItemCellDisableCell
    BaseGridControllerAny<TCollection>.UpdateSubViewsWhenMultipleRowSelectionChanges
    BaseGridControllerAny<TCollection>.ExcelExportCommand
    BaseGridControllerAny<TCollection>.NewItemHelper
    BaseGridControllerAny<TCollection>.CopyItemHelper
    BaseGridControllerAny<TCollection>.AllowColumnSelection
    BaseGridControllerAny<TCollection>.AllowPublicToggleCommand
    BaseGridControllerAny<TCollection>.AllowSearchCommand
    BaseGridControllerAny<TCollection>.AllowPageSizeCommand
    BaseGridControllerAny<TCollection>.AllowClearSearchSortFilter
    BaseGridControllerAny<TCollection>.AllowOpenCommand
    BaseGridControllerAny<TCollection>.AllowDeleteCommand
    BaseGridControllerAny<TCollection>.AllowNewCommand
    BaseGridControllerAny<TCollection>.AllowCopyCommand
    BaseGridControllerAny<TCollection>.ShowGrouping
    BaseGridControllerAny<TCollection>.ShowFrozenColumnsSplitter
    BaseGridControllerAny<TCollection>.ShowVerticalGridLines
    BaseGridControllerAny<TCollection>.CanUserSelect
    BaseGridControllerAny<TCollection>.AllowXMLImportExport
    BaseGridControllerAny<TCollection>.AllowMultipleSelect
    BaseGridControllerAny<TCollection>.AllowExcelExport
    BaseGridControllerAny<TCollection>.AllowSequencing
    BaseGridControllerAny<TCollection>.AutoOpenNewItemInTab
    BaseGridControllerAny<TCollection>.OpenFromRelatedColumnName
    BaseGridControllerAny<TCollection>.PreventDuplicateLookupIDs
    BaseGridControllerAny<TCollection>.PopulateNewFromLookupRelationship
    BaseGridControllerAny<TCollection>.SearchGroups
    BaseGridControllerAny<TCollection>.SearchElements
    BaseGridController.ClearSearchSortFilter()
    BaseGridController.InitAsync()
    BaseGridController.AddCustomCommand(ICustomCommand)
    BaseGridController.ProcessCustomCommandResult(object)
    BaseGridController.ColumnGroups()
    BaseGridController.GetQueryForExcelResults()
    BaseGridController.GetVisibleColumnNames()
    BaseGridController.AllPossibleSearchColumns()
    BaseGridController.SetOrdering(IEnumerable<QueryableSort>)
    BaseGridController.SetFilters(IEnumerable<QueryableFilter>)
    BaseGridController.SetSearch(string, IEnumerable<string>)
    BaseGridController.SetCreated(bool)
    BaseGridController.BulkUpdateMultipleSelectedItemsOnEdit
    BaseGridController.ComboItemsClear
    BaseGridController.DefaultColumnGroupIndexes
    BaseGridController.ExpandDefaultGroups
    BaseGridController.DefaultFrozenColumnCount
    BaseGridController.SearchColumns
    BaseGridController.Search
    BaseGridController.DefaultSearchColumn
    BaseGridController.BaseGridView
    BaseGridController.Created
    BaseGridController.InternalFilter
    BaseGridController.IsSelected
    BaseGridController.ColumnSortings
    BaseGridController.ColumnFilters
    BaseGridController.CustomCommandParam
    BaseGridController.OnlyExportGrid
    BaseGridController.OnlyExportFromQuery
    BaseGridController.LoadPager
    BaseGridController.LoadOrOverridenPager
    BaseGridController.UserOverridenPagingVisible
    BaseGridController.CurrentPageIndex
    ModelViewController.DisplayItem(object)
    ModelViewController.GetCurrentDisplayedItem(object)
    ModelViewController.GetCanWrite(object)
    ModelViewController.ShouldDisplayItem(object)
    ModelViewController.RemoveHandlers(object)
    ModelViewController.AddHandlers(object)
    ModelViewController.RemoveCommand(ViewCommand)
    ModelViewController.RemoveCommands<TOfType>()
    ModelViewController.InsertCommand(ViewCommand, int)
    ModelViewController.InsertCommand(ViewCommand, ViewCommand, ViewCommand)
    ModelViewController.UpdateAllCommands()
    ModelViewController.GetNestedViews()
    ModelViewController.RootController
    ModelViewController.ServiceContext
    ModelViewController.UIContext
    ModelViewController.CanWrite
    ModelViewController.TrackChanges
    ModelViewController.CheckIsLockedForCanWrite
    ModelViewController.DisplayIfNull
    ModelViewController.CurrentDisplayedItem
    ModelViewController.View
    ModelViewController.Commands
    ModelViewController.ContextHelpURL
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Views.Core
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    public abstract class BaseGridRelatedAnyCollectionController<TSingleItem, TCollection> : BaseGridControllerAny<TCollection>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<TCollection>, ICopyGridItemImplementor<TCollection>, IGrid, IDeleteGridItemImplementor<TCollection>, ISearchController, IModelViewController where TSingleItem : IBaseEntity
    Type Parameters
    Name Description
    TSingleItem

    An entity type inheriting from IBaseEntity

    TCollection

    Any type that are all related to the SingleItem in the query

    Constructors

    BaseGridRelatedAnyCollectionController(IBaseGridRelatedCollection<TSingleItem, TCollection>)

    Creates a new BaseGridRelatedAnyCollectionController with the specified instance of a default grid related collection view

    Declaration
    protected BaseGridRelatedAnyCollectionController(IBaseGridRelatedCollection<TSingleItem, TCollection> view)
    Parameters
    Type Name Description
    IBaseGridRelatedCollection<TSingleItem, TCollection> view

    The instance of the default grid related collection view in the client application

    Properties

    CollectionRelationshipColumnName

    This is the property on the TCollection entities that holds a relationship value that points to the SingleItem type

    This controller will automatically use that to filter the correct entities for the grid in AlterQuery(QueryableExecuter<TCollection>)

    Declaration
    public abstract string CollectionRelationshipColumnName { get; }
    Property Value
    Type Description
    string

    PopulateNewFromLookupColumnName

    Returns OpenFromRelatedColumnName

    Declaration
    public override string PopulateNewFromLookupColumnName { get; }
    Property Value
    Type Description
    string
    Overrides
    BaseGridControllerAny<TCollection>.PopulateNewFromLookupColumnName

    SingleItem

    The single item this grid is being displayed against and that all entities of type TCollection in the grid are related to

    Declaration
    public TSingleItem SingleItem { get; }
    Property Value
    Type Description
    TSingleItem

    Methods

    AddRelationshipJoin(QueryableExecuter<TCollection>)

    Alters the provided query by ensuring all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID

    This can be overridden to customise how the entities of type TCollection are precisely related to the SingleItem if not directly through that join

    Declaration
    protected virtual QueryableExecuter<TCollection> AddRelationshipJoin(QueryableExecuter<TCollection> query)
    Parameters
    Type Name Description
    QueryableExecuter<TCollection> query

    The existing query to return all the results that will populate the grid

    Returns
    Type Description
    QueryableExecuter<TCollection>

    An altered query that also ensures all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID

    AddRelationshipJoinSingleItem(QueryableExecuter<TSingleItem>)

    Declaration
    protected virtual QueryableExecuter<TSingleItem> AddRelationshipJoinSingleItem(QueryableExecuter<TSingleItem> query)
    Parameters
    Type Name Description
    QueryableExecuter<TSingleItem> query
    Returns
    Type Description
    QueryableExecuter<TSingleItem>

    AlterQuery(QueryableExecuter<TCollection>)

    Additionally alters the base query alteration by ensuring all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID

    This is achieved via AddRelationshipJoin(QueryableExecuter<TCollection>) which can be overidden to customise how the entities of type TCollection are precisely related to the SingleItem if not directly through that join

    Declaration
    protected override QueryableExecuter<TCollection> AlterQuery(QueryableExecuter<TCollection> query)
    Parameters
    Type Name Description
    QueryableExecuter<TCollection> query

    The existing query to return all the results that will populate the grid

    Returns
    Type Description
    QueryableExecuter<TCollection>

    An altered query that also ensures all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID

    Overrides
    BaseGridControllerAny<TCollection>.AlterQuery(QueryableExecuter<TCollection>)

    GetGridController(IBaseGridRelatedCollection<TSingleItem, TCollection>)

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

    Either returns a BaseGridRelatedAnyCollectionController<TSingleItem, TCollection> or a BaseGridRelatedCollectionController<TSingleItem, TCollection>

    Declaration
    public static BaseGridControllerAny<TCollection> GetGridController(IBaseGridRelatedCollection<TSingleItem, TCollection> view)
    Parameters
    Type Name Description
    IBaseGridRelatedCollection<TSingleItem, TCollection> view

    The instance of the default grid related collection view in the client application

    Returns
    Type Description
    BaseGridControllerAny<TCollection>

    A new default grid view related controller with the specified instance of a default grid related controller view

    UpdateNewItem(TCollection)

    Updates any new item created in this grid to also have the CollectionRelationshipColumnName property hold the value of the SingleItem ID

    Declaration
    protected override Task UpdateNewItem(TCollection item)
    Parameters
    Type Name Description
    TCollection item

    The new item created for this grid

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    BaseGridControllerAny<TCollection>.UpdateNewItem(TCollection)

    Implements

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

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.