RayCraftDocs
v1.0.3 raycraft.dev
On this page

TreeList

Complete

A tree whose nodes are table rows. Expand and collapse, sort, filter and choose columns; the keyboard follows the WAI-ARIA treegrid pattern.

Example

TreeList control

Parameters

API

ParameterTypeDescription
ChildrenSelectorFunc<TItem, IEnumerable<TItem>>Returns the children of an item. Items without children are leaves.
ClassstringExtra CSS classes added to the root element.
ColumnsRenderFragmentColumn definitions: DataGridColumn elements.
DenseboolUses tighter cell padding.
ExpandAllboolExpands every node when the tree first appears.
ExportFileNamestringFile name of the CSV export, without the extension.
HeightstringMaximum height of the grid body, for example 24rem (default 28rem with VirtualScroll).
ItemsIEnumerable<TItem>The options to choose from.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
RowEditingboolEdits a whole row at once with edit, save and cancel buttons.
RowHeightintRow height in pixels when VirtualScroll is on (default 44).
SelectedItemTItemSelected node. Use with @bind-SelectedItem.
ShowExportboolAdds buttons that save the chart as a PNG or SVG image.
ShowFiltersboolShows a filter box under each filterable column header.
ShowToolbarboolShows the toolbar with the column chooser and CSV export.
StylestringInline style added to the root element.
VirtualScrollboolDraws only the visible rows (rows must have the fixed RowHeight).

TreeListColumn

ParameterTypeDescription
AlignTextAlignLeft (default), Center or Right.
EditableboolLets users edit the cells of the column by clicking them.
FilterableboolShows a filter box for this column (default true).
FormatstringFormat string for numbers and dates, e.g. N0 or d.
HiddenboolHides the column at first; users can show it from the toolbar.
SortableboolAllows sorting by this column (default true).
TemplateRenderFragment<TItem>
TitlestringTitle text (drawer header, tab caption, column header, step caption).
ValueFunc<TItem, Object>Current value. Use with @bind-Value.
WidthstringSkeleton: any CSS length. Charts: drawing width in SVG units (the chart still scales to its container).

Events

API

EventTypeDescription
OnRowEditedEventCallback<TItem>Raised after a row was saved, with the item.
SelectedItemChangedEventCallback<TItem>Raised when another node is selected.

TreeListColumn

EventTypeDescription
EditedEventCallback<TreeListEdit<TItem>>Raised with the item and the new text when an edit is confirmed.

Package

TreeList is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.