I'm working with the scheduler component in angular I want to group my tasks by user in the sheduler when I use the [group]="GroupData" property defined in my ts the scheduler does not render my tasks it gives the following error:
ERROR TypeError: Cannot read properties of null (reading 'generateResourceLevels')
at VerticalView2.generateColumnLevels (vertical-view.js:186:53)
at VerticalView2.renderLayout (vertical-view.js:454:31)
at Render2.initializeLayout (renderer.js:118:32)
at Render2.render (renderer.js:14:14)
at Schedule2.initializeView (schedule.js:436:27)
at Schedule2.renderElements (schedule.js:227:14)
at Schedule2.initializeResources (schedule.js:196:18)
at Schedule2.render (schedule.js:136:14)
at Component4.appendTo (component.js:255:18)
at appendToComponent (component-base.js:151:35)
at component-base.js:157:17
I'm using angular version 17 and the scheduler version is "@syncfusion/ej2-angular-schedule": "^25.2.3",
component html
I am using "@syncfusion/ej2-angular-schedule" version: "^25.2.3",
<ejs-schedule width='100%' height='550px' [selectedDate]="selectedDate" [eventSettings]="eventSettings" [group]="groupData"> <e-views> <e-view option="Day" startHour="08:00" endHour="18:00"></e-view> <e-view option="Week" startHour="08:00" endHour="18:00"></e-view> <e-view option="WorkWeek" startHour="08:00" endHour="18:00"></e-view> <e-view option="Month" [showWeekend]="showWeekend"></e-view> </e-views> <e-resources> <e-resource field="ConsultantID" title="Resource Name" name="Resources" textField="Name" idField="Id" colorField="Color" [dataSource]="consultantDataSource"> </e-resource> </e-resources> </ejs-schedule> |
Thanks for the correction.
Another problem arose when trying to customize the resourceHeaderTemplate the scheduler stops displaying the activities.
<ng-template #resourceHeaderTemplate let-data> <div class="template-wrap"> <div class="employee-category"> <div> <img src="{{data?.resourceData.ImageUrl}}" alt="{{data?.resourceDataName }}" class="employee-image" /> </div> <div class="employee-name">{{data?.resourceData.Name }}</div> <div class="employee-designation">{{data?.resourceData.Designation}}</div> </div> </div> </ng-template> |
Hello Mark.
I'm facing a problem with the scheduler in Angular and I don't know if you can help me.
I'm using the scheduler component and the TimelineMonth view. I want to display all the days of the month without having to display horizontal scrolling. I tried using a class to add custom styles but it seems to have no effect on the scheduler component.
html code
Eusébio Joveth,
We have reviewed and validated the HTML code and CSS styles
you shared. It appears that you are using the timelineMonth view; however, the .e-timeline-month-view
selector is missing in your CSS customization, which has caused the override
styles not to reflect in the timelineMonth view. Please refer to the styles and
sample provided below for a reference on displaying all days of the month
without a scrollbar.
[app.component.css]
|
.schedule-cell-dimension.e-schedule .e-timeline-month-view .e-date-header-wrap table col, .schedule-cell-dimension.e-schedule .e-timeline-month-view .e-content-wrap table col, .schedule-cell-dimension.e-schedule .e-timeline-view .e-content-wrap table col { width: 30px; } |
Sample link: https://stackblitz.com/edit/angular-uvmfgu-es1abq?file=src%2Fapp.component.html,src%2Fapp.component.css
Output screenshot:
Don't hesitate to get in touch if you require further help or more information.
Regards,
Vijay