Category / Section
How to refresh TreeGrid
1 min read
Using refresh public method, we can refresh the TreeGrid after any modifications made on the content. We need to pass any datasource as an argument to refresh entire TreeGrid.
Please find the code example to refresh the TreeGrid
<button onclick="clickme()" style="margin-bottom:10px">Refresh TreeGrid</button> <div id="TreeGridContainer" style="height:400px;width:100%"></div> <script type="text/javascript"> $(function () { $("#TreeGridContainer").ejTreeGrid({ dataSource: projectData, // }) }); function clickme() { var treeObj = $("#TreeGridContainer").data("ejTreeGrid"); //To refresh TreeGrid with new datasource treeObj.refresh(refreshedData); } </script>
Please find the sample to refresh TreeGrid with new data source