Hi Sergio,
Syncfusion greetings.
We have prepared the below sample to display the resource based on button click.
<div class='buttonDiv'>
<button id='prevButton' cssClass="e-flat" iconCss="e-btn-sb-icon e-prev-icon" ejs-button (click)="onPreviousClick()" ></button>
<button id='nextButton' cssClass="e-flat" ejs-button class = 'e-btn-sb-icon e-next-icon' (click)="onNextClick()"></button>
</div>
onPreviousClick() {
let index = this.getResourceIndex();
if (index > 0) {
let resource = (this.resourceDataSource[index - 1] as any).AirlineId;
this.scheduleObj.resources[0].query = new Query().where('AirlineId', 'equal', resource);
this.scheduleObj.dataBind();
}
}
onNextClick() {
let index = this.getResourceIndex();
if (index < this.resourceDataSource.length - 1) {
let resource = (this.resourceDataSource[index + 1] as any).AirlineId;
this.scheduleObj.resources[0].query = new Query().where('AirlineId', 'equal', resource);
this.scheduleObj.dataBind();
}
}
Regards,
Karthi