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.

Example
View Source
Edit In Stackblitz  
Change Theme:

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

  1. Download and install the package.

       npm install --save @progress/kendo-angular-treelist @progress/kendo-angular-dropdowns @progress/kendo-angular-inputs @progress/kendo-angular-dateinputs @progress/kendo-data-query @progress/kendo-angular-intl @progress/kendo-angular-l10n @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
  2. 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 {
    }
  3. 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.

  4. For Angular 9.x and later, install the @angular/localize package:

    1. Run npm install --save @angular/localize.
    2. Add import '@angular/localize/init'; to your src/polyfills.ts 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-excel-export
  • @progress/kendo-angular-inputs
  • @progress/kendo-angular-intl
  • @progress/kendo-angular-l10n
  • @progress/kendo-angular-pdf-export
  • @progress/kendo-angular-popup
  • @progress/kendo-data-query
  • @progress/kendo-drawing
  • rxjs

The TreeList package utilizes the Angular animation system, which supports a specific set of browsers.

Functionality and Features

You can also use a context menu in the TreeList by integrating the Kendo UI ContextMenu for Angular.