Getting Started with the Kendo UI for Angular TreeList
The Kendo UI TreeList for Angular displays hierarchical data in a tabular format and comes with many built-in features, including paging, sorting, filtering, and data binding.
Basic Usage
The following example demonstrates a TreeList data-bound to flat data.
Installation
Either use the quick setup (Angular CLI) or manually add the package.
Quick Setup with the Angular CLI
The Angular CLI supports the addition of packages through the ng add
command which executes in one step the set of otherwise individually needed commands.
ng add @progress/kendo-angular-treelist
Manual Setup
Download and install the package.
npm install --save @progress/kendo-angular-treelist @progress/kendo-angular-dropdowns @progress/kendo-angular-treeview @progress/kendo-angular-inputs @progress/kendo-angular-dateinputs @progress/kendo-data-query @progress/kendo-angular-intl @progress/kendo-angular-l10n @progress/kendo-angular-label @progress/kendo-drawing @progress/kendo-angular-excel-export @progress/kendo-angular-buttons @progress/kendo-angular-common @progress/kendo-angular-pdf-export @progress/kendo-angular-popup @progress/kendo-licensing
Once installed, import the TreeListModule in your application root or feature module.
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { TreeListModule } from '@progress/kendo-angular-treelist'; import { AppComponent } from './app.component'; @NgModule({ bootstrap: [AppComponent], declarations: [AppComponent], imports: [BrowserModule, BrowserAnimationsModule, TreeListModule] }) export class AppModule { }
You are required to install one of the Kendo UI themes for Angular to style your components. For more information on how to add the styles, refer to the section on styling.
For Angular 9.x and later, install the
@angular/localize
package:- Run
npm install --save @angular/localize
. - Add
import '@angular/localize/init';
to yoursrc/polyfills.ts
file.
- Run
Follow the instructions on the Kendo UI for Angular My License page to activate your license. You can skip this step if your application already contains a Kendo UI license file.
Dependencies
The TreeList package requires the following peer dependencies that have to be installed by your application:
- @angular/common
- @angular/core
- @angular/forms
- @angular/animations
- @progress/kendo-angular-buttons
- @progress/kendo-angular-common
- @progress/kendo-angular-dateinputs
- @progress/kendo-angular-dropdowns
- @progress/kendo-angular-treeview
- @progress/kendo-angular-excel-export
- @progress/kendo-angular-inputs
- @progress/kendo-angular-intl
- @progress/kendo-angular-l10n
- @progress/kendo-angular-label
- @progress/kendo-angular-pdf-export
- @progress/kendo-angular-popup
- @progress/kendo-data-query
- @progress/kendo-drawing
- @progress/kendo-licensing
- rxjs
The TreeList package utilizes the Angular animation system, which supports a specific set of browsers.
Functionality and Features
- Data operations
- Export options
- Advanced implementations
- More settings
You can also use a context menu in the TreeList by integrating the Kendo UI ContextMenu for Angular.