This article describes how to change the default icons of EasyuiTreegrid. For more information, see the following:
We can add iconCls to json text to change the default icon, for example, in the example:
{"total":7,"rows":[{"id":1,"name":"All Tasks","begin":"3/4/2010","end":"3/20/2010","progress":60,"iconCls":"icon-ok"},{"id":2,"name":"Designing","begin":"3/4/2010","end":"3/10/2010","progress":100,"_parentId":1,"state":"closed"},{"id":21,"name":"Database","persons":2,"begin":"3/4/2010","end":"3/6/2010","progress":100,"_parentId":2},{"id":22,"name":"UML","persons":1,"begin":"3/7/2010","end":"3/8/2010","progress":100,"_parentId":2},{"id":23,"name":"Export Document","persons":1,"begin":"3/9/2010","end":"3/10/2010","progress":100,"_parentId":2},{"id":3,"name":"Coding","persons":2,"begin":"3/11/2010","end":"3/18/2010","progress":80},{"id":4,"name":"Testing","persons":1,"begin":"3/19/2010","end":"3/20/2010","progress":20}],"footer":[{"name":"Total Persons:","persons":7,"iconCls":"icon-sum"}]}
Then, modify icon.css and put the icons to be used in the specified folder.
As mentioned in general, treegrid can display your own icons.
The suffix. If no, the style in easyui.css overwrites icon.css and displays the default icon.
The following describes the addition, deletion, modification, and query code of jQuery EasyUI treegrid.