Articles in this section
Category / Section

How to map the expand status of a record from data source in Gantt

1 min read

Gantt supports displaying records with child nodes in expanded or collapsed state at initial load. This can be achieved by mapping the state from the data source field to the expandStateMapping property.

You can also display all the records in the collapsed state at initial load in Gantt by enabling the enableCollapseAll property.

The following example explains mapping the expanded status of each record from the data source.

<script type="text/javascript"> 
     var resourceGroups = [ 
    { groupId: 1, groupName: "Planning Team", isInExpand: true }, 
    { groupId: 2, groupName: "Developement Team", isInExpand: false }, 
    { groupId: 3, groupName: "Testing Team", isInExpand: false } 
        ]; 
$(function () { 
       $("#resourceGantt").ejGantt({ 
                dataSource: resourceGanttData, 
                groupCollection: resourceGroups, 
                allowColumnResize: true, 
                expandStateMapping:'isInExpand', 
                 //.. 
                }); 
        }); 

Click here, to find the sample with previous requirements.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied