Skip to the content.

PromptPlus API:IControlTableMultiSelect

Build Publish License NuGet Downloads

Back to List Api

IControlTableMultiSelect<T>

Namespace: PPlus.Controls

Represents the interface with all Methods of the Table Select control

public interface IControlTableMultiSelect<T> : IPromptControls<IEnumerable<T>>

Type Parameters

T

Implements IPromptControls<IEnumerable<T>>

Methods

AddColumn(Expression<Func<T, Object>>, UInt16, Func<Object, String>, Alignment, String, Alignment, Boolean, Boolean, Nullable<UInt16>)

Add Column
AddColumn cannot be used with AutoFill

IControlTableMultiSelect<T> AddColumn(Expression<Func<T, Object>> field, ushort width, Func<Object, String> format, Alignment alignment, string title, Alignment titlealignment, bool titlereplaceswidth, bool textcrop, Nullable<UInt16> maxslidinglines)

Parameters

field Expression<Func<T, Object>>
Expression that defines the field associated with the column

width UInt16
column size

format Func<Object, String>
Function to format the field.If not informed, it will be ToString()

alignment Alignment
alignment content

title String
The Column title

titlealignment Alignment
alignment title

titlereplaceswidth Boolean
title width overrides column width when greater

textcrop Boolean
If true the value will be truncated by the column size, otherwise, the content will be written in several lines

maxslidinglines Nullable<UInt16>
Maximum Sliding Lines when the content length is greater than the column size and textcrop = false.

Returns

IControlTableMultiSelect<T>

AddDefault(params T[])

Add default value selected to initial list.

IControlTableMultiSelect<T> AddDefault(params T[] values)

Parameters

values T[]
Value default

Returns

IControlTableMultiSelect<T>

AddDefault(IEnumerable<T>)

Add default value selected to initial list.

IControlTableMultiSelect<T> AddDefault(IEnumerable<T> values)

Parameters

values IEnumerable<T>
Value default

Returns

IControlTableMultiSelect<T>

AddFormatType<T1>(Func<Object, String>)

Function to format columns by field type when not specified by ‘AddColumn’.

IControlTableMultiSelect<T> AddFormatType<T1>(Func<Object, String> funcfomatType)

Type Parameters

T1
Type to convert

Parameters

funcfomatType Func<Object, String>
The function

Returns

IControlTableMultiSelect<T>

AddItem(T, Boolean, Boolean)

Add item to list

IControlTableMultiSelect<T> AddItem(T value, bool disable, bool selected)

Parameters

value T
Item to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlTableMultiSelect<T>

AddItems(IEnumerable<T>, Boolean, Boolean)

Add items to list

IControlTableMultiSelect<T> AddItems(IEnumerable<T> values, bool disable, bool selected)

Parameters

values IEnumerable<T>
items colletion to add

disable Boolean
true item disabled, otherwise no

selected Boolean
true item selected, otherwise no

Returns

IControlTableMultiSelect<T>

AddItemsTo(AdderScope, params T[])

Add Items to list with scope Disable/Remove AdderScope
At startup the list items will be compared and will be removed or disabled
Tip: Use for custom comparer

IControlTableMultiSelect<T> AddItemsTo(AdderScope scope, params T[] values)

Parameters

scope AdderScope
scope Disable/Remove

values T[]
items colletion

Returns

IControlTableMultiSelect<T>

AutoFill(params Nullable<UInt16>[])

Auto generate Columns
AutoFill cannot be used with AddColumn and/or AutoFit
Header alignment will always be ‘Center’
The content alignment will always be ‘Left’ and will always be with sliding lines
Columns are generated by the public properties of the data class recognized by .
TypeCode.DBNull and TypeCode.Object will be ignored.
The column size will be automatically adjusted by the title size (Name property) and the minmaxwidth parameter or content width when min/max width is null

IControlTableMultiSelect<T> AutoFill(params Nullable<UInt16>[] minmaxwidth)

Parameters

minmaxwidth Nullable<UInt16>[]
minimum and maximum width

Returns

IControlTableMultiSelect<T>

AutoFit(params UInt16[])

Set the grid to auto-resize to current console width
AutoFit cannot be used with AutoFill

IControlTableMultiSelect<T> AutoFit(params UInt16[] indexColumn)

Parameters

indexColumn UInt16[]
List (cardinality) of columns that will be affected.
If none all columns that will be affected

Returns

IControlTableMultiSelect<T>

ChangeDescription(Func<T, Int32, Int32, String>)

Dynamically change the description using a user role

IControlTableMultiSelect<T> ChangeDescription(Func<T, Int32, Int32, String> value)

Parameters

value Func<T, Int32, Int32, String>
function to apply change
Func(T, int, int, string) = T = item, int = current row (base0) , int = current col (base0)

Returns

IControlTableMultiSelect<T>

ColumnsNavigation(Boolean)

Enable Columns Navigation when Templates is active. Default false.
When the column size is greater than the screen size, the content will be truncated

IControlTableMultiSelect<T> ColumnsNavigation(bool value)

Parameters

value Boolean
Enable Columns Navigation

Returns

IControlTableMultiSelect<T>

Config(Action<IPromptConfig>)

Custom config the control.

IControlTableMultiSelect<T> Config(Action<IPromptConfig> context)

Parameters

context Action<IPromptConfig>
action to apply changes. IPromptConfig

Returns

IControlTableMultiSelect<T>

EqualItems(Func<T, T, Boolean>)

Custom item comparator

IControlTableMultiSelect<T> EqualItems(Func<T, T, Boolean> comparer)

Parameters

comparer Func<T, T, Boolean>
function comparator

Returns

IControlTableMultiSelect<T>

FilterByColumns(FilterMode, params UInt16[])

Set Columns used by Filter strategy.

IControlTableMultiSelect<T> FilterByColumns(FilterMode filter, params UInt16[] indexColumn)

Parameters

filter FilterMode
Filter strategy for filter rows.Default value is FilterMode.Disabled

indexColumn UInt16[]
list (cardinality) of columns

Returns

IControlTableMultiSelect<T>

HideHeaders(Boolean)

Hide columns headers. Default false.

IControlTableMultiSelect<T> HideHeaders(bool value)

Parameters

value Boolean
Hide headers

Returns

IControlTableMultiSelect<T>

Interaction<T1>(IEnumerable<T1>, Action<IControlTableMultiSelect<T>, T1>)

Execute a action foreach item of colletion passed as a parameter

IControlTableMultiSelect<T> Interaction<T1>(IEnumerable<T1> values, Action<IControlTableMultiSelect<T>, T1> action)

Type Parameters

T1
Layout external colletion

Parameters

values IEnumerable<T1>
Colletion for interaction

action Action<IControlTableMultiSelect<T>, T1>
Action to execute

Returns

IControlTableMultiSelect<T>

Layout(TableLayout)

The Table layout. Default value is ‘TableLayout.SingleGridFull’

IControlTableMultiSelect<T> Layout(TableLayout value)

Parameters

value TableLayout
The TableLayout

Returns

IControlTableMultiSelect<T>

OrderBy(Expression<Func<T, Object>>)

Sort items by expression

IControlTableMultiSelect<T> OrderBy(Expression<Func<T, Object>> value)

Parameters

value Expression<Func<T, Object>>
expresion to sort the rows

Returns

IControlTableMultiSelect<T>

OrderByDescending(Expression<Func<T, Object>>)

Sort Descending items by expression

IControlTableMultiSelect<T> OrderByDescending(Expression<Func<T, Object>> value)

Parameters

value Expression<Func<T, Object>>
expresion to sort the rows

Returns

IControlTableMultiSelect<T>

OverwriteDefaultFrom(String, Nullable<TimeSpan>)

Overwrite defaults start selected value with last result saved on history.

IControlTableMultiSelect<T> OverwriteDefaultFrom(string value, Nullable<TimeSpan> timeout)

Parameters

value String
name of file to save history

timeout Nullable<TimeSpan>
The timeout for valid items saved. Default value is 365 days

Returns

IControlTableMultiSelect<T>

PageSize(Int32)

Set max.item view per page.
Default value : 10.The value must be greater than or equal to 1

IControlTableMultiSelect<T> PageSize(int value)

Parameters

value Int32
Number of Max.rows

Returns

IControlTableMultiSelect<T>

Range(Int32, Nullable<Int32>)

Defines a minimum and maximum (optional) range of items selected in the list

IControlTableMultiSelect<T> Range(int minvalue, Nullable<Int32> maxvalue)

Parameters

minvalue Int32
Minimum number of items

maxvalue Nullable<Int32>
Maximum number of items

Returns

IControlTableMultiSelect<T>

SeparatorRows(Boolean)

Set separator between rows. Default false.

IControlTableMultiSelect<T> SeparatorRows(bool value)

Parameters

value Boolean
separator between rows

Returns

IControlTableMultiSelect<T>

Styles(TableSelectStyle, Style)

Overwrite Styles

IControlTableMultiSelect<T> Styles(TableSelectStyle content, Style value)

Parameters

content TableSelectStyle
TableSelectStyle of content

value Style
The Style

Returns

IControlTableMultiSelect<T>

Templates(Func<IEnumerable<T>, String>, Func<IEnumerable<T>, String>)

Template for selected item and finished select

IControlTableMultiSelect<T> Templates(Func<IEnumerable<T>, String> selectedTemplate, Func<IEnumerable<T>, String> finishTemplate)

Parameters

selectedTemplate Func<IEnumerable<T>, String>
message template function when selected item.
Func(T, int, int, string) = T = item, int = current row (base0) , int = current col (base0)

finishTemplate Func<IEnumerable<T>, String>
message template function when finish control with seleted item
Func(T, int, int, string) = T = item, int = current row (base0) , int = current col (base0)

Returns

IControlTableMultiSelect<T>

Title(String, Alignment, TableTitleMode)

Set Title Table

IControlTableMultiSelect<T> Title(string value, Alignment alignment, TableTitleMode titleMode)

Parameters

value String
Title

alignment Alignment
alignment title. Default value is Alignment.Center

titleMode TableTitleMode
InLine(Default): Write the title above the grid. InRow : Write the title inside the grid as a row

Returns

IControlTableMultiSelect<T>


Back to List Api