Interface IBaseGrid<T>
The standard object grid view that can dynamically create appropriate columns as required from an implementation of the BaseGridController<T>
This is the core view for creating grids for any object in the system
Both this view and the IBaseDefaultSingleView<T> view have a similar mechanism for creating controls dynamically within the UIInherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
[ViewDescriptor(typeof(BaseGridEntityCollectionViewInstanceEnumerator))]
public interface IBaseGrid<T> : IBaseGrid, IModelView, IOpenGridItemImplementor<T>, IGridSelector, IGridSelectionMode, IItemSelector, IHasToggleStatus, IDisposable
Type Parameters
Name | Description |
---|---|
T | The type of object this view works with |
Properties
TotalRowCount
Returns the filtered row count of the grid (if there is no paging and the filtered items result in a total item count less than the controller total count), otherwise the total row count from the grid controller
Declaration
int TotalRowCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
CloseUI()
Closes the grid and removes any templates and references
Declaration
void CloseUI()
CreateColumn(ControlDisplayInfo, bool)
Adds the specified column definition to the grid
Declaration
void CreateColumn(ControlDisplayInfo definition, bool inDefaultGroup)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | definition | The definition of the column to dynamically create within the grid |
bool | inDefaultGroup | Indicates this column should be added to the columns all the grid data should be grouped by |
CreateColumnGroup(GridColumnGroup)
Creates a column grouping on the grid that other columns will be registered as belonging to (via GroupKey)
Declaration
void CreateColumnGroup(GridColumnGroup group)
Parameters
Type | Name | Description |
---|---|---|
GridColumnGroup | group | THe definition of the group to be created in the grid on the view |
GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
A function that takes the PopulateNewFromLookupColumnName and displays a popup window to the user allowing them to select multiple entities to be linked to new items in the grid.
For each selected item the view will call the provided callBack
Declaration
Task GetLookupIDsForNewItems(Func<IBaseEntity, Task> callBack)
Parameters
Type | Name | Description |
---|---|---|
Func<IBaseEntity, Task> | callBack | The function to execute for each item the user selected in the popup |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
ResetColumnsAndGroups()
Removes all the groups and columns added to the grid
Declaration
void ResetColumnsAndGroups()
SetGridSource(ObservableCollection<T>)
Sets the source data to be displayed in the grid within the view
Declaration
void SetGridSource(ObservableCollection<T> query)
Parameters
Type | Name | Description |
---|---|---|
ObservableCollection<T> | query | THe observable set of data to be displayed in the grid |
SetPreviewColumns(ControlDisplayInfo[])
Sets the columns that should be used to display a preview window, with those column values, beside the scroll bar when scrolling through all the data
Declaration
void SetPreviewColumns(ControlDisplayInfo[] definitions)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo[] | definitions | The definitions of the columns to be included within the preview window while scrolling |
SetupGrid()
Providse the view with an opportunity to setup the grid before displaying any data on it
Declaration
void SetupGrid()
ToggleSearch(bool)
Indicates the default text search view for the grid should be made visible/hidden
Only implemented if the view does not have a custom implementation for the Commands.ViewCommands.SearchGrid<T> command which can handle it any bespoke way preferred
Declaration
void ToggleSearch(bool visible)
Parameters
Type | Name | Description |
---|---|---|
bool | visible | Indicates if the search should be visible or not |
UpdateColumn(ControlDisplayInfo)
Updates the display of a column from its definition, including properties like formatting and query filtering/etc
Declaration
void UpdateColumn(ControlDisplayInfo definition)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | definition | The defintiion of the column to update, with its new properties |
UpdateColumnToDefaultGroup(ControlDisplayInfo, bool, int?)
Declaration
void UpdateColumnToDefaultGroup(ControlDisplayInfo definition, bool inDefaultGroup, int? index)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | definition | |
bool | inDefaultGroup | |
int? | index |
UpdatedGridSourceCollection()
Informs the grid the observable collection it is using as its source (from SetGridSource(ObservableCollection<T>)) has been updated
Used for grids that don't check the collection changing
Declaration
void UpdatedGridSourceCollection()