We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





132331 Aug 26,2017 04:29 PM UTC Aug 28,2017 11:35 AM UTC Angular 1
Tags: ejGantt
Asked On August 26, 2017 04:29 PM UTC


is there any similar function to expandAtLevel from Grid?
Curently I have the following part of function, which expand records to number level and colapse others:
for(let item of args.model.flatRecords){
if((item.level < number && !item.expanded) || (item.level == number && item.expanded))
and this works OK, but it becom slow, when I have 500+ records in my Gantt.
So is there any better way?


Suriyaprasanth Ravikumar [Syncfusion]
Replied On August 28, 2017 11:35 AM UTC

Hi Marko, 
Please find the response below. 
Query 1: is there any similar function to expandAtLevel from Grid? 
Answer: At present, there is no method available to expand/collapse the record at specific level in Gantt. For this we have already logged a feature report as” Public method support to expand/collapse records at specific level”. This feature will be included in our upcoming volume 4, 2017 main release which will be expected to out at end of October, 2017. 
Query 2: but it become slow, when I have 500+ records in my Gantt. 
Answer: We can overcome this performance delay by enabling virtualization support in Gantt. We can enable this by set “enbleVirtualization” property as true. 
As per your requirement we have prepared a sample and reduced the time delay on expand/collapse action. 
We have achieved by using “enableVirtualization” property and by preventing the unwanted execution of “expandCollapseRecord” public method by checking whether it contains child records or not. 
Please refer the following code snippet. 
<ej-gantt id="GanttControl" [dataSource]="datasource" [enableVirtualization]="true" 
<button (click)="expandCollapse(1)">Expand/Collapse</button> 
    public expandCollapse(Number?: number) { 
        var ganttObj = $("#GanttControl").ejGantt('instance'); 
        for(let item of ganttObj.model.flatRecords){ 
            if (item.hasChildRecords && ((item.level < Number && !ganttObj.getExpandStatus(item)) || (item.level == Number && ganttObj.getExpandStatus(item)))) 
Please find the sample from below location. 
Please let us know if you require further assistance on this. 
Suriyaprasanth R.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon