PromptPlus

PromptPlus # PromptPlus ## **TableMultiSelect<T> — Operations** [![NuGet](https://img.shields.io/badge/NuGet-PromptPlus-blue)](https://www.nuget.org/packages/PromptPlus) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![.NET](https://img.shields.io/badge/.NET-8%20%7C%209%20%7C%2010-512BD4)](https://dotnet.microsoft.com/)

← Back to HomeNext: TableMultiSelect — Styles →


How the TableMultiSelect<T> control behaves while it is running: keyboard, checkboxes, ranges, filtering, horizontal scrolling, paging, history, and view-only mode.


Anatomy of the control

Select products: Notebook Pro            ← prompt + live answer (follows the cursor + column)
Category: Electronics                     ← description (optional / dynamic)
+---------------------------------------+
|   |  Id  | Name          |   Price    |  ← header row
+---+------+---------------+------------+
| x |    1 | Notebook Pro  |  $ 1299.99 |  ← focused, checked row
|   |    2 | Wireless Mouse|  $   29.90 |  ← unchecked row
+---------------------------------------+
Filter: note                              ← live filter text (when filtering)
Page 1/2                                  ← pagination
Space: check  Enter: confirm  Esc: cancel ← tooltip

The answer line updates as you navigate: without a TextSelector it shows the value of the row under the cursor in whichever column is currently Tab-focused (Tab/ Shift+Tab change it); with a TextSelector, that fixed text is shown instead, regardless of column. Once confirmed (Enter), the final answer shown is the checked-rows summary (comma-joined), resolved the same way per row.

Every region can be recolored — see Styles.


Keyboard

Key Action
/ Move focus up / down (rows)
Page Up / Page Down Jump one page
Ctrl+Home / Ctrl+End First / last row
Space Toggle the checkbox on the focused row
Tab / Shift+Tab Move the focused column; wraps around at the first/last column
Enter Confirm the checked set (enforces Range)
Esc Abort → IsAborted == true
Any printable character Type to filter (when Filter is not Disabled)
Backspace Edit the filter text
F2 Toggle all rows on / off (respects the check predicate)
F3 Show only the checked rows / restore the full list
F1 Cycle tooltip content
Ctrl+F1 Show / hide the tooltip

Disabled rows are skipped and cannot be toggled.

The exact physical keys for toggle-all / filter-selected are configurable — the tooltip line always shows the active bindings. See Keyboard Bindings.


Checking rows


Range constraints

Range(min, max?) is enforced on Enter:


Columns

Column alignment

ColumnAlignment sets per-column horizontal alignment:

Value Effect
Left Align cell content to the left (default)
Right Align cell content to the right (typical for numbers)
Center Center cell content

Horizontal scrolling

Tab / Shift+Tab always move the focused column, wrapping around at the first/last column — this works even when every column already fits on screen and nothing needs to scroll. HorizontalScroll only changes what happens once scrolling is actually needed (the columns don’t all fit within the console width):


Layout & border regions


Filtering

When Filter is Contains or StartsWith, typing narrows the visible rows in real time:

Disabled (the default) turns typing off entirely — arrow keys only.


Initial checked set & history


View-only mode

ViewOnly() renders the table for display only:


Options that change behavior

Set per instance via Options(...), or globally on PromptPlus.Config:

Option Effect on TableMultiSelect<T>
EnabledAbortKey(false) Removes Esc — the user must confirm
HideAfterFinish(true) Erases the table after confirm — the whole control is erased, not just the interactive part
ShowTooltip(false) Hides the keyboard hint line
Prompt(...) / Description(...) Overrides the prompt / description text

PageSize can be set per control (PageSize) or globally (PromptPlus.Config.PageSize).


Edge cases & gotchas


See also