<ejs-treegrid #treegrid [dataSource]='data' idMapping='TaskID' parentIdMapping='ParentItem' hasChildMapping='isParent' [treeColumnIndex]='1' allowPaging='true' [pageSettings]='pageSetting' (collapsed)="onCollapse($event)">
<e-columns>
<e-column field='TaskID' headerText='Task ID' width='120' textAlign='Right'></e-column>
<e-column field='TaskName' headerText='Task Name' width='150'></e-column>
<e-column field='StartDate' headerText='Start Date' width='120' format="yMd" textAlign='Right'></e-column>
<e-column field='EndDate' headerText='End Date' width='120' format="yMd" textAlign='Right'></e-column>
<e-column field='Duration' headerText='Duration' width='110' textAlign='Right'></e-column>
<e-column field='Progress' headerText='Progress' width='110'></e-column>
<e-column field='Priority' headerText='Priority' width='130'></e-column>
</e-columns>
</ejs-treegrid>
onCollapse(e):void{
let trGrid = this.treegrid;
trGrid.refresh();
}
|