TreeViewTElement Class

Represents a TreeView component. The component does not concern itself with the element it is placed in; background, size etc. is handled by parent HTML components

Definition

Namespace: MobileTrack.Web.Components.Components
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
public sealed class TreeView<TElement> : ComponentBase
where TElement : class, IIdLabel, IHasEnvironment
Inheritance
Object    ComponentBase    TreeViewTElement

Type Parameters

TElement
Model items to display.

Constructors

TreeViewTElementInitializes a new instance of the TreeViewTElement class

Properties

ContextMenuId Reference to the context menu when the user right-clicks on an item
Id HTML ID of the element
OnItemSelected Invoked when an item is selected.
SelectedItem Represents the selected item in the stack, for rendering purposes.
TreeItems TreeView items to display

Methods

AddItem Adds an item to the TreeView. The item is added as a child to the parent with the same EnvironmentId as the item.
RemoveItem Removes an item from the tree.
SetParametersAsync Parameters are loaded manually for sake of performance; if we were to use System.Reflection magic, it would hurt performance if components were used in large numbers.
(Overrides ComponentBaseSetParametersAsync(ParameterView))
UpdateItem Updates an item in the TreeView. The item is updated by finding the item with the same ID and replacing its content with the content of item.

See Also