|
Title: TreeGrid iconCls- setting css dynamic style instead of css name Post by: amir-t on July 16, 2013, 02:34:34 AM Hi,
Is there any way to set a treeGrid node iconCls property by assigning the style itself like : {background:url('icons/myIcon.gif') no-repeat;} , on the fly? Instead of assigning the class name? The problem is that i have a dynamic icons list, about 1000 icons, and i don't have them arranged in a full css external file which i can use its css classes names. In addition, the url of the icons can be changed and therefore i need to set each node a dynamic image url of a certain icon instead of setting a specific css class name, which the iconCls property need to be filled with. Regards. Title: Re: TreeGrid iconCls- setting css dynamic style instead of css name Post by: stworthy on July 16, 2013, 09:26:10 AM A solution to solve this issue is to hide the original icon and use 'formatter' to add an icon to the left of tree field.
Code: <style> Code: $('#tg').treegrid({Title: Re: TreeGrid iconCls- setting css dynamic style instead of css name Post by: amir-t on July 17, 2013, 02:09:32 AM It Works!! thanks a lot.
|