Please refer to the example is the following link
http://www.jeasyui.com/tutorial/tree/treegrid3.php and you will find enclosed a sql dump of the table used to hold tree data, where you can easily find how id and parentId is used in treegrid3demo_getdata.php code to form tree dynamically.