Question : Currently, I am using Treegrid in full lazy load, when I clicked a parent node it displays all the child nodes. Now my question is there any way with which I can refresh the opened level ? I want to reload the child again from server.. but for only one parent.

Answer:

Basically, the approach is very similar to what you would do when you loaded the children the first time. 

Lets look at some sample code:

First, lets add the button:

+  <div class="toolbar">  <button onclick="onRefreshClick()">Refresh Children of First Parent</button>

+</div>

On Refresh, we will just reload the first child:

+         function refreshChildren(parent, level){   if(!parent || !level)

+                return;

+            $.ajax({

+                url : GridConFig.ApiCallBaseUrl,

+                data : {name : "child_data", parent_id : parent.id},

+                type : "GET",

+                success : function(res){

+                    var response = JSON.parse(res);

+                    if(response.success){

+                        level.grid.setChildData(parent, response.data, level);

+                    } else {

+                        alert(response.message);

+                    }

+                }

+            });

+        }

+

+        function onRefreshClick(){

+            var grid = document.getElementById("grid-container").component;

+            if(!grid || !grid.getDataProvider())

+                return;

+            refreshChildren(grid.getDataProvider()[0], grid.getColumnLevel())

         }