Dijit Tree now ultra-stylable
Posted by Shane O'Sullivan on October 1, 2009
The Dojo Tree has always been easy to make look just like you want, from changing the icons to changing the labels.
However there was always a limitation in that an entire row could not be styled. Well, today I put through a fix for that, and you can now specify a CSS class and style for each row using the getRowClass and getRowStyle functions.
You can see a simple test of this at http://archive.dojotoolkit.org/dojo-2010-06-01/dojotoolkit/dijit/tests/tree/test_Tree_Styling.html , available from Oct 2nd 2009, and it’ll be included in version 1.4, which goes into beta any day now. It shows how you can easily make the tree appear like an expandable, nestable list widget, with just a tiny bit of CSS.
I also plan on writing up a number of dojo.cookie articles over at dojocampus.org in the coming weeks on all the cool things you can do with the tree.



Eike said
The URL is down, I can’t look *scream* *just nervous* *tipping with my fingers on the desk* What should I do … I can’t reach the URL ?
Sincerly,
Eike
Shane O'Sullivan said
The URL is working now, just try again
Cristian Raducanu said
The page is not up any more. Can you please fix it once again?
Shane O'Sullivan said
Hmm, it looks like someone removed the page from the tests. Damn
Cristian R said
Is there any way to get it back?
Shane O'Sullivan said
I modified the link to point at an older version that still has that page.
Thanks for letting me know!
Cristian R said
No problem! Thank you! Is there anywhere a code snippet to show how you used the function?