Search Results for

    Show / Hide Table of Contents

    Class BaseGridAnyRelatedAnyCollectionController<T>

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

    This is the main base controller for creating grids, and dynamically creating their columns, for any entity in the system that is related to another object. It is different from BaseGridRelatedAnyCollectionController<TSingleItem, TCollection> or BaseGridRelatedCollectionController<TSingleItem, TCollection> as that single item type must be the same, where as this can have a parent that can be of different types allowing it to work against any entity parent

    Both this controller and the BaseDefaultSingleViewController<T> view have a similar mechanism for creating controls dynamically within the UI
    Inheritance
    object
    ModelViewController
    BaseGridController
    BaseGridControllerAny<T>
    BaseGridAnyRelatedAnyCollectionController<T>
    SQLWrapperDatasetReferenceGrid
    SQLWrapperResultsController
    Implements
    IBaseGridController
    ICollectionExportable
    INewGridItemImplementor<T>
    ICopyGridItemImplementor<T>
    IGrid
    IDeleteGridItemImplementor<T>
    ISearchController
    IModelViewController
    Inherited Members
    BaseGridControllerAny<T>.CanDelete(T)
    BaseGridControllerAny<T>.Clear()
    BaseGridControllerAny<T>.CloseController()
    BaseGridControllerAny<T>.Redisplay()
    BaseGridControllerAny<T>.GetGridController(IBaseGrid<T>)
    BaseGridControllerAny<T>.GetInternalDescriptor()
    BaseGridControllerAny<T>.CanEditRowItem(T)
    BaseGridControllerAny<T>.CanEditRowItem(T, short)
    BaseGridControllerAny<T>.OnTrackedItemChanged(object, string)
    BaseGridControllerAny<T>.GetGridSourceItems()
    BaseGridControllerAny<T>.GetGridSourceItems(IEnumerable<T>, QueryableExecuterApplyType)
    BaseGridControllerAny<T>.AlterLoadedItems(IEnumerable<T>)
    BaseGridControllerAny<T>.LoadExtendedItem(Type, object)
    BaseGridControllerAny<T>.InitDisplay()
    BaseGridControllerAny<T>.ResetColumnsAndGroups(bool)
    BaseGridControllerAny<T>.DisplayUI()
    BaseGridControllerAny<T>.GetItemToReselect(object)
    BaseGridControllerAny<T>.LoadAdditionalColumns()
    BaseGridControllerAny<T>.Columns()
    BaseGridControllerAny<T>.AddCol(short, ControlDisplayInfoLight, EntityDescriptor)
    BaseGridControllerAny<T>.ColumnNames()
    BaseGridControllerAny<T>.PivotColumns(short)
    BaseGridControllerAny<T>.ApplyGridSettingsToFilter(QueryableExecuter)
    BaseGridControllerAny<T>.ApplyPaging(QueryableExecuter)
    BaseGridControllerAny<T>.SetTotalCount(int)
    BaseGridControllerAny<T>.SetPageIndex(int)
    BaseGridControllerAny<T>.TrackResults(IEnumerable<T>)
    BaseGridControllerAny<T>.AlterColumnInfo(ControlDisplayInfo)
    BaseGridControllerAny<T>.UpdateColumnFromName(string)
    BaseGridControllerAny<T>.GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)
    BaseGridControllerAny<T>.IsZeroColumnColumnVisible(string)
    BaseGridControllerAny<T>.ToggleZeroColumns()
    BaseGridControllerAny<T>.UpdateAllZeroColumns()
    BaseGridControllerAny<T>.UpdateTransferColumnStatus()
    BaseGridControllerAny<T>.OnSelectedItemsChanged(IEnumerable<T>)
    BaseGridControllerAny<T>.GetStandardExtraColumns(string)
    BaseGridControllerAny<T>.ReApply()
    BaseGridControllerAny<T>.InitCommands(IList<ViewCommand>)
    BaseGridControllerAny<T>.GetPublicToggleCommand()
    BaseGridControllerAny<T>.GetOpenGridCommand()
    BaseGridControllerAny<T>.GetNewGridCommand()
    BaseGridControllerAny<T>.GetCopyGridCommand()
    BaseGridControllerAny<T>.GetDeleteCommand()
    BaseGridControllerAny<T>.DeleteCommandIsQuickAccess()
    BaseGridControllerAny<T>.GetUpCommand()
    BaseGridControllerAny<T>.GetDownCommand()
    BaseGridControllerAny<T>.MoveItemSequence(object, object)
    BaseGridControllerAny<T>.OnOpenRowItem(T)
    BaseGridControllerAny<T>.GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
    BaseGridControllerAny<T>.RemoveItems(IEnumerable<T>)
    BaseGridControllerAny<T>.AddItem(T)
    BaseGridControllerAny<T>.ToggleSearch(bool)
    BaseGridControllerAny<T>.CollectionType
    BaseGridControllerAny<T>.Descriptor
    BaseGridControllerAny<T>.ListenToChanges
    BaseGridControllerAny<T>.RowPreviewColumns
    BaseGridControllerAny<T>.GridView
    BaseGridControllerAny<T>.CurrentGridItems
    BaseGridControllerAny<T>.CurrentItems
    BaseGridControllerAny<T>.AutoSelectFirstRow
    BaseGridControllerAny<T>.AddStandardColumns
    BaseGridControllerAny<T>.StandardColumnsUniqueGroupKey
    BaseGridControllerAny<T>.DefaultRowCount
    BaseGridControllerAny<T>.DefaultOrOverridenRowCount
    BaseGridControllerAny<T>.UserOverridenPagingAmount
    BaseGridControllerAny<T>.PagerRequired
    BaseGridControllerAny<T>.TotalCount
    BaseGridControllerAny<T>.LimitPagesToTotal
    BaseGridControllerAny<T>.TotalPageCount
    BaseGridControllerAny<T>.Sortings
    BaseGridControllerAny<T>.Filters
    BaseGridControllerAny<T>.ShowCheckboxForMultiSelect
    BaseGridControllerAny<T>.TogglerZeroColumn
    BaseGridControllerAny<T>.TransferColToggler
    BaseGridControllerAny<T>.ItemRowColorProperty
    BaseGridControllerAny<T>.CanCreateNew
    BaseGridControllerAny<T>.SelectedItemForSubViews
    BaseGridControllerAny<T>.ItemCellDisableCell
    BaseGridControllerAny<T>.UpdateSubViewsWhenMultipleRowSelectionChanges
    BaseGridControllerAny<T>.ExcelExportCommand
    BaseGridControllerAny<T>.NewItemHelper
    BaseGridControllerAny<T>.CopyItemHelper
    BaseGridControllerAny<T>.AllowColumnSelection
    BaseGridControllerAny<T>.AllowPublicToggleCommand
    BaseGridControllerAny<T>.AllowSearchCommand
    BaseGridControllerAny<T>.AllowPageSizeCommand
    BaseGridControllerAny<T>.AllowClearSearchSortFilter
    BaseGridControllerAny<T>.AllowOpenCommand
    BaseGridControllerAny<T>.AllowDeleteCommand
    BaseGridControllerAny<T>.AllowNewCommand
    BaseGridControllerAny<T>.AllowCopyCommand
    BaseGridControllerAny<T>.ShowGrouping
    BaseGridControllerAny<T>.ShowFrozenColumnsSplitter
    BaseGridControllerAny<T>.ShowVerticalGridLines
    BaseGridControllerAny<T>.CanUserSelect
    BaseGridControllerAny<T>.AllowXMLImportExport
    BaseGridControllerAny<T>.AllowMultipleSelect
    BaseGridControllerAny<T>.AllowExcelExport
    BaseGridControllerAny<T>.AllowSequencing
    BaseGridControllerAny<T>.AutoOpenNewItemInTab
    BaseGridControllerAny<T>.OpenFromRelatedColumnName
    BaseGridControllerAny<T>.PreventDuplicateLookupIDs
    BaseGridControllerAny<T>.PopulateNewFromLookupRelationship
    BaseGridControllerAny<T>.SearchGroups
    BaseGridControllerAny<T>.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 BaseGridAnyRelatedAnyCollectionController<T> : BaseGridControllerAny<T>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<T>, ICopyGridItemImplementor<T>, IGrid, IDeleteGridItemImplementor<T>, ISearchController, IModelViewController
    Type Parameters
    Name Description
    T

    An entity type inheriting from IBaseEntity that are all related to the SingleItem

    Constructors

    BaseGridAnyRelatedAnyCollectionController(IBaseGridAnyRelatedAnyCollection<T>)

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

    Declaration
    public BaseGridAnyRelatedAnyCollectionController(IBaseGridAnyRelatedAnyCollection<T> view)
    Parameters
    Type Name Description
    IBaseGridAnyRelatedAnyCollection<T> view

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

    Properties

    CollectionRelationshipColumnName

    This is the property on the T 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<T>)

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

    CollectionRelationshipColumnNameLabel

    Holds the label column for the CollectionRelationshipColumnName

    Declaration
    public virtual string CollectionRelationshipColumnNameLabel { get; }
    Property Value
    Type Description
    string

    PopulateNewFromLookupColumnName

    Returns OpenFromRelatedColumnName

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

    SingleItem

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

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

    Methods

    AlterQuery(QueryableExecuter<T>)

    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

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

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

    Returns
    Type Description
    QueryableExecuter<T>

    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<T>.AlterQuery(QueryableExecuter<T>)

    GetGridController(IBaseGridAnyRelatedAnyCollection<T>)

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

    Declaration
    public static BaseGridAnyRelatedAnyCollectionController<T> GetGridController(IBaseGridAnyRelatedAnyCollection<T> view)
    Parameters
    Type Name Description
    IBaseGridAnyRelatedAnyCollection<T> view

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

    Returns
    Type Description
    BaseGridAnyRelatedAnyCollectionController<T>

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

    UpdateNewItem(T)

    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(T item)
    Parameters
    Type Name Description
    T item

    The new item created for this grid

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    BaseGridControllerAny<T>.UpdateNewItem(T)

    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.