New to Telerik UI for Blazor? Start a free 30-day trial

PanelBar Events

Updated on Sep 3, 2026

This article explains the events available in the Telerik TreeView for Blazor:

OnItemClick

The OnItemClick event fires when the user clicks (or presses Enter) on an node (item) of the PanelBar. You can use this event to react on user clicking on a node.

The event handler receives a PanelBarItemClickEventArgs object which provides the model of the clicked node in the Item field that you can cast to your model type.

If that item has children the OnItemClick event will fire before the ExpandedItemsChanged event.

Handle OnItemClick to react to user click action.

Example
View Source
Loading ...

ExpandedItemsChanged

The ExpandedItemsChanged event fires when the user expands or collapses a node (item) in the PanelBar.

Handle the ExpandedItemsChanged events

Example
View Source
Loading ...

OnItemRender

The OnItemRender event fires upon rendering the nodes of the PanelBar. It receives an argument of type PanelBarItemRenderEventArgs which exposes the following fields:

  • Item - an object you can cast to your model class to obtain the current data item.

  • Class - the CSS class that will be applied to the item's main element. The CSS rules that are set for that class will be visibly rendered on the PanelBar node.

If the item that is customized has children, they will also inherit the styles applied in the CSS class passed to the Class parameter.

Example
View Source
Loading ...

OnExpand and OnCollapse

The OnExpand and OnCollapse events fire when the user tries to expand/collapse an item, but before the actual action takes place.

The OnExpand handler receives an argument of type PanelBarExpandEventArgs.

The OnCollapse handler receives an argument of type PanelBarCollapseEventArgs.

Both event arguments expose an Item and IsCancelled properties. To cancel each event, set args.IsCancelled to true. In this case, the item will gain focus and selection, but its state will remain unchanged.

PanelBar OnExpand and OnCollapse Events

Example
View Source
Loading ...

See Also