In TreeGrid control, user can display the rows in collapsed state at initial load. This can be achieved by enabling the “enableCollapseAll” property. Please refer the following code snippets for collapsing all the rows of the TreeGrid. Code snippets: JS <div id="TreeGridContainer" style="height:400px;width:100%"></div> <script type="text/javascript"> $(function () { $("#TreeGridContainer").ejTreeGrid({ //... dataSource: projectData, enableCollapseAll: true, }) }); </script> The following output is displayed as a result of the above code example. A sample to collapse all rows in TreeGrid is available in the following link, |
This page will automatically be redirected to the sign-in page in 10 seconds.