Reference example: TreeGrid: lazy load creation Code <div id = "treegrid1" class = "mini-treegrid" style = "width: 600px; height: 250px;" url = ".. /data/TreeService. aspx? Method = LoadNodes "showTreeIcon =" true "textField =" text "idField =" id "treeColumn =" filename "onbeforeload =" onBeforeTreeLoad "> <div property =" columns "> <div name = "filename" field = "name" width = "150"> name </div> <div field = "type" width = "100"> type </div> <div field = "size" width = "100" dateFormat = "yyyy-MM-dd"> size </div> <div field = "createdate" width = "100" dateFormat = "yyyy-MM-dd"> creation date </div> the server returns data [{I D: "form", text: "Form ",...... isLeaf: false, // whether the leaf node is + and-expanded: false // The node is in the shrinking State}, ......] isLeft indicates whether the node has a lower-level node. Expanded indicates that the node is in the collapsed State. When a user clicks the "+" icon, the next-level node is automatically loaded. The current node id is passed to the background. You can also block loading events and add additional attributes: function onBeforeTreeLoad (e) {var tree = e. sender; // tree control var node = e. node; // var params = e. params; // parameter object // you can pass custom attributes params. myField = "123"; // Background: The request object obtains "myField"}. After the server processes the request and obtains the "id" attribute, it loads the array of the next-level nodes of the node, and return in JSON format. String id = Request ["id"]; if (String. isNullOrEmpty (id) id = "-1"; // obtain the String SQL = "select * from plus_file where pid = '" + id + "'order by updatedate "; arrayList folders = DBUtil. select (SQL); // determines whether a node exists. If yes, isLeaf and expanded are processed. For (int I = 0, l = folders. count; I <l; I ++) {Hashtable node = (Hashtable) folders [I]; String nodeId = node ["id"]. toString (); String sql2 = "select * from plus_file where pid = '" + nodeId + "'order by updatedate"; ArrayList nodes = DBUtil. select (sql2); if (nodes. count> 0) {node ["isLeaf"] = false; node ["expanded"] = false ;}// return JSONString json = PluSoft. utils. JSON. encode (folders); Response. write (json );