Search Results for

    Show / Hide Table of Contents

    Class BaseGridCustomController<T>

    The system controller used for automatically creating a IBaseGrid<T> according to a ICustomGrid definition

    Uses the GridViewControllerCustomViewParams parameter for the view to determine the ICustomGrid to load the defintion of

    Inheritance
    object
    ModelViewController
    BaseGridController
    BaseGridControllerAny<T>
    BaseGridController<T>
    BaseGridCustomController<T>
    Implements
    IBaseGridController
    ICollectionExportable
    INewGridItemImplementor<T>
    ICopyGridItemImplementor<T>
    IGrid
    IDeleteGridItemImplementor<T>
    ISearchController
    IModelViewController
    Inherited Members
    BaseGridController<T>.LoadExtendedItem(Type, object)
    BaseGridController<T>.GetGridSourceItems()
    BaseGridController<T>.LoadExtendedData(IEnumerable<T>)
    BaseGridController<T>.ConvertParameterItemsFilterToItems(IEnumerable<IBaseEntity>)
    BaseGridController<T>.GetInternalDescriptor()
    BaseGridController<T>.GetCurrentQuery()
    BaseGridController<T>.GetQueryForExcelResults()
    BaseGridController<T>.GetCreationQuery()
    BaseGridController<T>.AddParameterIDFilterToQuery(QueryableExecuter<T>, IEnumerable<Guid>)
    BaseGridController<T>.AddParameterFilterToQuery(QueryableExecuter<T>, QueryableFilter)
    BaseGridController<T>.GetOpenGridCommand()
    BaseGridController<T>.GetCopyGridCommand()
    BaseGridController<T>.OnOpenRowItem(T)
    BaseGridController<T>.ProcessCustomCommandResult(object)
    BaseGridController<T>.AllowIDFilter
    BaseGridController<T>.NewItemHelper
    BaseGridController<T>.CopyItemHelper
    BaseGridController<T>.AllowOpenCommand
    BaseGridController<T>.AllowNewCommand
    BaseGridController<T>.AllowCopyCommand
    BaseGridController<T>.AllowDeleteCommand
    BaseGridController<T>.OpenInSameContext
    BaseGridController<T>.HasGlobalFilter
    BaseGridControllerAny<T>.Clear()
    BaseGridControllerAny<T>.CloseController()
    BaseGridControllerAny<T>.Redisplay()
    BaseGridControllerAny<T>.GetGridController(IBaseGrid<T>)
    BaseGridControllerAny<T>.CanEditRowItem(T)
    BaseGridControllerAny<T>.CanEditRowItem(T, short)
    BaseGridControllerAny<T>.GetGridSourceItems(IEnumerable<T>, QueryableExecuterApplyType)
    BaseGridControllerAny<T>.AlterLoadedItems(IEnumerable<T>)
    BaseGridControllerAny<T>.InitDisplay()
    BaseGridControllerAny<T>.ResetColumnsAndGroups(bool)
    BaseGridControllerAny<T>.DisplayUI()
    BaseGridControllerAny<T>.GetItemToReselect(object)
    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>.GetNewGridCommand()
    BaseGridControllerAny<T>.GetDeleteCommand()
    BaseGridControllerAny<T>.DeleteCommandIsQuickAccess()
    BaseGridControllerAny<T>.GetUpCommand()
    BaseGridControllerAny<T>.GetDownCommand()
    BaseGridControllerAny<T>.MoveItemSequence(object, object)
    BaseGridControllerAny<T>.GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
    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>.SelectedItemForSubViews
    BaseGridControllerAny<T>.ItemCellDisableCell
    BaseGridControllerAny<T>.UpdateSubViewsWhenMultipleRowSelectionChanges
    BaseGridControllerAny<T>.ExcelExportCommand
    BaseGridControllerAny<T>.AllowColumnSelection
    BaseGridControllerAny<T>.AllowPublicToggleCommand
    BaseGridControllerAny<T>.AllowSearchCommand
    BaseGridControllerAny<T>.AllowPageSizeCommand
    BaseGridControllerAny<T>.AllowClearSearchSortFilter
    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>.OpenFromRelatedColumnName
    BaseGridControllerAny<T>.PreventDuplicateLookupIDs
    BaseGridControllerAny<T>.PopulateNewFromLookupRelationship
    BaseGridControllerAny<T>.SearchGroups
    BaseGridControllerAny<T>.SearchElements
    BaseGridController.ClearSearchSortFilter()
    BaseGridController.AddCustomCommand(ICustomCommand)
    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.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 class BaseGridCustomController<T> : BaseGridController<T>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<T>, ICopyGridItemImplementor<T>, IGrid, IDeleteGridItemImplementor<T>, ISearchController, IModelViewController where T : IBaseEntity
    Type Parameters
    Name Description
    T

    The entity type to be displayed and edited by this grid controller

    Constructors

    BaseGridCustomController(IBaseGrid<T>)

    Creates a new system BaseGridCustomController with the specified instance of a default grid view

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

    The instance of the default grid view in the client application

    Properties

    AutoOpenNewItemInTab

    Indicates when creating a new item in the grid that it should automatically be opened in a new tab as well

    The default is true if the type T is an entity that is not a IsStandingDataEntity

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

    CanCreateNew

    Indicates if the user can create new items in the grid

    The default implementation is true, allowing specific controller implementations to provide override values

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

    PopulateNewFromLookupColumnName

    Indicates when creating a new item the system should create a popup showing a selection of items from this property relationship on type T, that will automatically be set for the new item

    For each relationship entity selected the system will call the callback in the GetLookupIDsForNewItems(Func<IBaseEntity, Task>) function

    The default implementation is null, indicating a new item is just created as is, but can be overridden by inheriting controllers to force relationship selections first before creating items
    Declaration
    public override string PopulateNewFromLookupColumnName { get; }
    Property Value
    Type Description
    string
    Overrides
    BaseGridControllerAny<T>.PopulateNewFromLookupColumnName

    Methods

    AlterQuery(QueryableExecuter<T>)

    Provides the inheriting controller an opportunity to modify the query used to load the data for this IBaseGrid<T>

    Default implementation does nothing unless the type T is an entity with a property with a SequenceStart, in which case it is ordered by that

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

    The query for this grid to always be altered before being executed

    Returns
    Type Description
    QueryableExecuter<T>

    The query to be used to execute results for this grid

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

    CanDelete(T)

    Indicates if the selected item is allowed to be deleted based on the status of the item itself

    The default implementation is false, allowing specific controller implementations to provide override values

    Declaration
    public override Task<bool> CanDelete(T item)
    Parameters
    Type Name Description
    T item

    The item to check if it can be deleted

    Returns
    Type Description
    Task<bool>

    True if the specified item can be deleted

    Overrides
    BaseGridControllerAny<T>.CanDelete(T)

    ColumnGroups()

    Returns all the groups the columns belong to (if any) as defined in the GroupinName for the LoadAdditionalColumns()

    Declaration
    public override IEnumerable<GridColumnGroup> ColumnGroups()
    Returns
    Type Description
    IEnumerable<GridColumnGroup>

    All the groups the columns belong to (if any) as defined in the GroupinName for the LoadAdditionalColumns()

    Overrides
    BaseGridController.ColumnGroups()

    Columns()

    Returns all the columns loaded from LoadAdditionalColumns()

    Declaration
    public override IEnumerable<ControlDisplayInfo> Columns()
    Returns
    Type Description
    IEnumerable<ControlDisplayInfo>

    All the columns loaded from LoadAdditionalColumns() which dynamically represent the definitions in ICustomGridColumn for this ICustomGrid

    Overrides
    BaseGridControllerAny<T>.Columns()

    DisplayItem(object)

    Clears the view, determines if CanWrite is true, and if it ShouldDisplayItem(object?) then calls AddHandlers(object) and DisplayUI()

    Declaration
    public override Task DisplayItem(object item)
    Parameters
    Type Name Description
    object item

    The item to be displayed against this View

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    ModelViewController.DisplayItem(object)

    InitAsync()

    Provides the controller a chance to initialize any dependant data. Called once by the system after controller creation.

    Declaration
    public override Task InitAsync()
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    BaseGridController.InitAsync()

    LoadAdditionalColumns()

    Loads all the control definitions as defined by the ICustomGridColumn collection for the ICustomGrid specified in the GridViewControllerCustomViewParams for this view

    Declaration
    protected override Task LoadAdditionalColumns()
    Returns
    Type Description
    Task

    All the control definitions as defined by the ICustomGridColumn collection for the ICustomGrid specified in the GridViewControllerCustomViewParams for this view

    Overrides
    BaseGridControllerAny<T>.LoadAdditionalColumns()

    OnTrackedItemChanged(object, string)

    Provids a mechanism for handling changes for any item in the context

    By default this is used to apply changes made to a selected item automatically to all other selected items in the grid (if multi-select is enabled)

    Declaration
    protected override void OnTrackedItemChanged(object item, string propName)
    Parameters
    Type Name Description
    object item

    The item that changed

    string propName

    The property name of the changed value

    Overrides
    BaseGridControllerAny<T>.OnTrackedItemChanged(object, string)

    RemoveItems(IEnumerable<T>)

    Removes the specified set of items from the grid and if the items in the grid have a property marked as SequenceStart then it will decrement the ones above these deleted items to reflect their change in order

    Declaration
    public override Task RemoveItems(IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items

    The items to be removed from the CurrentItems

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    BaseGridControllerAny<T>.RemoveItems(IEnumerable<T>)

    UpdateNewItem(T)

    Provides an inheriting controller an opportunity to alter the newly created item by the grid before it is added to the IBaseGrid<T> itself

    By default this ensures the item has the next maximum sequence number if the item is an entity that has a property with a SequenceStart

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

    The newly created item to be added to the 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.