Angular Gantt - toolbar
items[]
Selector: dxi-item
Type:
Accepted Values: 'separator' | 'undo' | 'redo' | 'expandAll' | 'collapseAll' | 'addTask' | 'deleteTask' | 'zoomIn' | 'zoomOut' | 'taskDetails' | 'fullScreen' | 'resourceManager' | 'showResources' | 'showDependencies'
The Gantt UI component allows you to add default and create custom toolbar items.
app.component.html
app.component.ts
app.module.ts
- <dx-gantt>
- <dxo-toolbar>
- <dxi-item name="undo"></dxi-item>
- <dxi-item name="redo"></dxi-item>
- <dxi-item name="separator"></dxi-item>
- <dxi-item
- widget="dxButton"
- [options]="customButtonOptions">
- </dxi-item>
- </dxo-toolbar>
- <dxi-column dataField="title" caption="Subject" [width]="300"></dxi-column>
- <dxi-column dataField="start" caption="Start Date"></dxi-column>
- <dxi-column dataField="end" caption="End Date"></dxi-column>
- </dx-gantt>
- import { Component } from '@angular/core';
- import { Service } from './app.service';
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css'],
- providers: [Service]
- })
- export class AppComponent {
- constructor(service: Service) {
- this.customButtonOptions = {
- text: 'About',
- icon: 'info',
- stylingMode: 'text',
- onClick: () => {
- // ...
- }
- };
- }
- }
- import { BrowserModule } from '@angular/platform-browser';
- import { NgModule } from '@angular/core';
- import { AppComponent } from './app.component';
- import { DxGanttModule } from 'devextreme-angular';
- @NgModule({
- imports: [
- BrowserModule,
- DxGanttModule
- ],
- declarations: [AppComponent],
- bootstrap: [AppComponent]
- })
- export class AppModule { }
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.