I am trying to display a tree node(under isomorpic tree grid) with icon base on the data source status.
Example: if the status is high priority. I am going to display a red flag icon with the tickent number.
If the status is midium priority. I am going to display a yellow icon.
If the status is low priority. I am going to display a green flag icon.
Please help.
Mark
Hi Wuchen5,
To modify the standard icon displayed for some node (the “folder” / “file” icon by default) in a TreeGrid, you can set the treeGrid.customIconProperty for the node in question. This property defaults to “icon”, so by default if you set node.icon directly on some node in your data, you should see the custom icon displayed instead of the standard file/folder icon.
If you want to derive the icon dynamically, you can override the getIcon() method directly on the treeGrid. In your case you’d probably check for some “priority” type field on your node data, and return the appropriate node.
If you want an additional icon displayed next to the standard folder open/close icons (rather than altering the icons themselves), you can use the TreeGrid.getExtraIcon() method to display a custom icon for each record.
Let us know how you get on
Thanks
Isomorphic Software
hi wuchen5,
If possible, can you please share the code which got the solution.
I need to know the implementation of CustomIconProperty and getIcon for a Tree grid.
Thanks in advance.