New to Telerik UI for Blazor? Start a free 30-day trial
TreeList Data Binding to Interface
Updated on Oct 1, 2026
Since version 2.27, the TreeList supports binding to a collection of multiple model types that implement the same interface.
Note the usage of OnModelInit in the example below. The event handler sets the model type to be used for new items in the TreeList. One-type model creation is supported out-of-the-box. If you need to support adding instances of different types:
- Use custom Add buttons in the TreeList Toolbar, one for each model type.
- In each button click handler, define an
InsertedItemof the correct type in the TreeList State. - Put the TreeList in Insert mode with the SetStateAsync method.
Data Binding the TreeList to an Interface
Loading ...
Up to version 2.26, the
Datacollection of the TreeList must contain instances of only one model type.