Hi,
I have reviewed the examples in the Showcase as well as the API doc on
https://www.smartclient.com/smartgwt.../TreeGrid.html
but the answer is not obvious to me.
Can I set up my TreeGrid that uses different icon based on some field value? This is not just to differentiate between Folder and Node, but also between different types of leaf nodes. In other words, if the DS backing the TreeGrid has a field called nodeType, can I set a rule that says if nodeType is A, use iconA.jpg; if B, use iconB.jpg, etc
I think perhaps I can traverse the tree and then use the setCustomNodeIcon(Record node, String icon) on each node. But are there easier methods?
I am using SmartClient Version: v10.0p_2016-04-19/PowerEdition Deployment (built 2016-04-19)
I have reviewed the examples in the Showcase as well as the API doc on
https://www.smartclient.com/smartgwt.../TreeGrid.html
but the answer is not obvious to me.
Can I set up my TreeGrid that uses different icon based on some field value? This is not just to differentiate between Folder and Node, but also between different types of leaf nodes. In other words, if the DS backing the TreeGrid has a field called nodeType, can I set a rule that says if nodeType is A, use iconA.jpg; if B, use iconB.jpg, etc
I think perhaps I can traverse the tree and then use the setCustomNodeIcon(Record node, String icon) on each node. But are there easier methods?
I am using SmartClient Version: v10.0p_2016-04-19/PowerEdition Deployment (built 2016-04-19)
Comment