Search Results for

    Show / Hide Table of Contents

    Class BaseGridController

    The base non-type generic version of BaseGridControllerAny<T>/BaseGridController<T> which works with the IBaseGrid<T> view

    This is the main base controller for creating grids, and dynamically creating their columns, for any object in the system

    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>
    Implements
    IBaseGridController
    IGrid
    IModelViewController
    ICollectionExportable
    Inherited Members
    ModelViewController.CurrentDisplayedItem
    ModelViewController.CanWrite
    ModelViewController.TrackItemChanges
    ModelViewController.CheckIsLockedForCanWrite
    ModelViewController.View
    ModelViewController.InitAsync()
    ModelViewController.OnTrackedItemChanged(Object, String)
    ModelViewController.DisplayItem(Object)
    ModelViewController.ShouldDisplayItem(Object)
    ModelViewController.DisplayIfNull
    ModelViewController.Redisplay()
    ModelViewController.RemoveHandlers(Object)
    ModelViewController.AddHandlers(Object)
    ModelViewController.DisplayUI()
    ModelViewController.CloseController()
    ModelViewController.InitCommands(IList<ViewCommand>)
    ModelViewController.RemoveCommand(ViewCommand)
    ModelViewController.RemoveCommands<OFType>()
    ModelViewController.InsertCommand(ViewCommand, Int32)
    ModelViewController.InsertCommand(ViewCommand, ViewCommand, ViewCommand)
    ModelViewController.Commands
    ModelViewController.UpdateAllCommands()
    ModelViewController.SelectedItemForSubViews
    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 : ModelViewController, IBaseGridController, IGrid, IModelViewController, ICollectionExportable

    Constructors

    BaseGridController(IModelView)

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

    Declaration
    public BaseGridController(IModelView view)
    Parameters
    Type Name Description
    IModelView view

    The instance of the default grid view in the client application

    Properties

    BaseGridView

    The IBaseGrid view instance this controller works with

    Declaration
    public IBaseGrid BaseGridView { get; }
    Property Value
    Type Description
    IBaseGrid

    CollectionType

    Returns the type of object displayed in the grid

    Declaration
    public abstract Type CollectionType { get; }
    Property Value
    Type Description
    System.Type

    ColumnFilters

    Provides a list of the current groupings applied to the grid in the view by the user

    Declaration
    public IEnumerable<QueryableFilter> ColumnFilters { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<QueryableFilter>

    ColumnSortings

    Provides a list of the current sortings applied to the grid in the view by the user

    Declaration
    public IEnumerable<QueryableSort> ColumnSortings { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<QueryableSort>

    ComboItemsClear

    Provides a header to add to drop down combo columns so users can clear the value.

    By default this is blank as client applications can implement it on right-click or other behaviour.

    Somme applications do not allow that, so naming this Clear, or other value, will mean it is available for users to select at the top of the list to clear the value
    Declaration
    public static string ComboItemsClear { get; set; }
    Property Value
    Type Description
    System.String

    Created

    Indicates the grid has been created within the BaseGridView

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

    CurrentGridItems

    An enumeration of all the records currently displayed in the BaseGridView

    Declaration
    public abstract IEnumerable CurrentGridItems { get; }
    Property Value
    Type Description
    System.Collections.IEnumerable

    DefaultColumnGroupIndexes

    Groupings for columns to be grouped by and items have aggregation summaries of

    Declaration
    public virtual IEnumerable<int> DefaultColumnGroupIndexes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Int32>

    DefaultFrozenColumnCount

    The default number of columns to be included in the frozen column count. The default is 1

    Declaration
    public virtual int DefaultFrozenColumnCount { get; }
    Property Value
    Type Description
    System.Int32

    DefaultSearchColumn

    The name of the column to use in the default search of text in the grid

    Declaration
    protected virtual string DefaultSearchColumn { get; }
    Property Value
    Type Description
    System.String

    InternalFilter

    Provides the internal filter applied to the grid

    Declaration
    public QueryableFilter InternalFilter { get; set; }
    Property Value
    Type Description
    QueryableFilter

    OnlyExportFromQuery

    Indicates when performing a stadard data export that the data should only be exported by re-running a query to fetch the results again

    The default is false

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

    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 virtual bool OnlyExportGrid { get; }
    Property Value
    Type Description
    System.Boolean

    PagerRequired

    Indicates if the BaseGridView needs to display a pager control as the number of results exceed the maximum the grid shows in one go

    Declaration
    public abstract bool PagerRequired { get; }
    Property Value
    Type Description
    System.Boolean

    Search

    The search term to be included in any query filtering the results for this grid

    Declaration
    public string Search { get; }
    Property Value
    Type Description
    System.String

    SearchColumns

    The list of all columns to be searched by default when doing a default text search of everything

    Declaration
    public IEnumerable<string> SearchColumns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    TogglerZeroColumn

    Provides the toggler for switching between only showing columns with non-zero values or all

    Declaration
    public abstract IHasToggleStatus TogglerZeroColumn { get; }
    Property Value
    Type Description
    IHasToggleStatus

    Methods

    AllPossibleSearchColumns()

    Returns an enumeration of all column definitions that could be included in a default text search of the data in the grid

    Declaration
    public IEnumerable<string> AllPossibleSearchColumns()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    An enumeration of all column definitions that could be included in a default text search of the data in the grid

    Clear()

    Clears sorting, filters, and search settings for the grid

    Declaration
    public override Task Clear()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    ModelViewController.Clear()

    ColumnGroups()

    Header groupings that columns belong to. Can be heirarchical

    Declaration
    public virtual IEnumerable<GridColumnGroup> ColumnGroups()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<GridColumnGroup>

    Columns()

    A list of all the columns to be dynamically created in the IBaseGrid

    Can be overridden by the inheriting class to indicate the columns required.

    Declaration
    public virtual IEnumerable<ControlDisplayInfo> Columns()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ControlDisplayInfo>

    A list of all the controls to be dynamically created in the BaseGridView

    GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)

    Returns an enumeration of all the columns that can be exported from this grid in a standard data export (including which columns are currently visible or not)

    Declaration
    public abstract Task<IEnumerable<ControlDisplayVisibilityInfo>> GetExportableColumnInfo(IEnumerable<ColumnDescriptor> visibleColumns)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ColumnDescriptor> visibleColumns

    The list of currently visible columns in the BaseGridView

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ControlDisplayVisibilityInfo>>

    An enumeration of all the columns that can be exported from this grid in a standard data export (including which columns are currently visible or not)

    GetQueryForExcelResults()

    Returns the query to use for retrieving the data in this grid for a standard data export

    Declaration
    public virtual QueryableExecuter GetQueryForExcelResults()
    Returns
    Type Description
    QueryableExecuter

    The query to use for retrieving the data in this grid for a standard data export

    GetVisibleColumnNames()

    Returns the currently visible columns in the BaseGridView

    Declaration
    public Task<IEnumerable<ControlDisplayInfo>> GetVisibleColumnNames()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ControlDisplayInfo>>

    The currently visible columns in the BaseGridView

    SetFilters(IEnumerable<QueryableFilter>)

    Sets the ColumnFilters to the specified list of columns

    Declaration
    public void SetFilters(IEnumerable<QueryableFilter> filters)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<QueryableFilter> filters

    SetOrdering(IEnumerable<QueryableSort>)

    Sets the ColumnSortings to the specified list of columns

    Declaration
    public void SetOrdering(IEnumerable<QueryableSort> orders)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<QueryableSort> orders

    The columns to be sorted and in which direction

    SetSearch(String, IEnumerable<String>)

    Sets the Search term to be used, and for which columns, when querying the results of the grid

    Declaration
    public void SetSearch(string search, IEnumerable<string> columns)
    Parameters
    Type Name Description
    System.String search

    The term to search for across the grid data

    System.Collections.Generic.IEnumerable<System.String> columns

    The columns included in the search

    ToggleZeroColumns()

    Toggles between only showing columns with non-zero values or all

    Declaration
    public abstract void ToggleZeroColumns()

    Explicit Interface Implementations

    IGrid.GridItems

    An enumeration of all the records currently displayed in the BaseGridView

    Declaration
    IEnumerable IGrid.GridItems { get; }
    Returns
    Type Description
    System.Collections.IEnumerable

    Implements

    IBaseGridController
    IGrid
    IModelViewController
    ICollectionExportable

    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.