Hi Julien,
Greetings from Syncfusion support.
We have prepared a sample based on your shared query
using the dataBound
event of the Kanban component. In the below sample, all the swimlanes can be
opened and closed using a button and ‘rowExpandCollapse’ method. We have
prepared a sample for your reference.
app.component.html
|
<ejs-kanban (dataBound)="dataBound()">
</ejs-kanban>
|
app.component.ts
|
public dataBound(): void {
if (this.isInitialRender) {
this.OpenCloseSwimlane();
this.isInitialRender = false;
}
}
public OpenCloseSwimlane(): void {
var currentSwimlanes;
if (this.isOpenSwimlane) {
var currentSwimlanes = this.kanbanObj.element.querySelectorAll(
'.e-swimlane-row:not(.e-collapsed)'
);
this.isOpenSwimlane = false;
} else {
var currentSwimlanes = this.kanbanObj.element.querySelectorAll(
'.e-swimlane-row.e-collapsed'
);
this.isOpenSwimlane = true;
}
for (var i = 0; i < currentSwimlanes.length; i++) {
this.kanbanObj.actionModule.rowExpandCollapse(currentSwimlanes[i]);
}
}
|
Sample: https://stackblitz.com/edit/angular-y6g5bk-z5fkgy?file=app.component.ts,app.component.html,package.json
API link: https://ej2.syncfusion.com/angular/documentation/api/kanban#databound
Regards,
Buvana S