Hi Team,
Bases on a user input I am loading different columns, different resources and different events dynamically on the scheduler. But the resources for the newly defined columns are not rendering thought the column is getting displayed. I reproduced the issue in one the Angular examples where I am trying to add a 3rd column 'Age' and add additionalResources for it when user selects 3 from the dropdown. But the age column does not display the value.
{
text: 'Age',
hidden: true,
field : 'age',
width: 130,
renderer: ({ value }) => value
}
if (this.selectedValue == '3') {
columns[0].hidden = false;
columns[1].hidden = false;
columns[2].hidden = false;
this.scheduler.columns.removeAll();
this.scheduler.columns.add(columns);
this.scheduler.resourceStore.add(this.additionalResources);
}
Also When I initialise the scheduler with columns =[ ] and then load the columns dynamically during ngAfterViewInit I am gettting an error
TypeError: Cannot read properties of null (reading 'querySelector')
Due to this I am initialising the columns array with a hidden column as below. Is there a better way to handle this.
{
text: '',
field: 'id',
hidden: true
}