Angular Scheduler - Customize Individual Views

To customize an individual view, specify a <dxi-view> configuration component. Assign a view type value to the views.type property to define which view is customized. Specify views[] properties to implement your changes.

The following code snippet customizes the "day" and "workWeek" views. This example groups appointments by a resource in the "workWeek" view. For more information about appointment grouping, refer to the following topic: Group Appointments by Resources.

app.component.html
  • <dx-scheduler ... >
  • <dxi-resource
  • fieldExpr="ownerId"
  • [dataSource]="employees">
  • </dxi-resource>
  • <dxi-view type="day"
  • [cellDuration]="60"
  • timeCellTemplate="timeCellTemplate">
  • </dxi-view>
  • <dxi-view type="workWeek" [groups]="['ownerId']"></dxi-view>
  • <div *dxTemplate="let data of 'timeCellTemplate'">
  • <i style="color: green">{{data.text}}</i>
  • </div>
  • </dx-scheduler>

To add a view without customizations, specify only the views.type property:

app.component.html
  • <dx-scheduler ... >
  • <dxi-view type="day"></dxi-view>
  • <dxi-view type="workWeek"></dxi-view>
  • </dx-scheduler>
NOTE
Properties defined in the views[] array override their corresponding properties specified in the component configuration. For instance, views.firstDayOfWeek overrides the firstDayOfWeek property.

Customize Individual Views Demo Increase View Duration Demo

See Also