View Full Version : Tree: How to get a column right-aligned?

6 Mar 2009, 1:02 AM
I am just wondering how I can adjust the text in a tree.

First I want to adjust the content either left-aligned (for text) or right-aligned (for numbers or especially currencies)?

Second it would be very nice to have a chance to formate a single cell / row in an other color to mark some special records. What is the best way to realize this?

Here a sample tree I am using:

Thanks for your help.

6 Mar 2009, 5:11 AM
I found a possibility to get a column formatted by using css.

Put the cls property in the columns definition of the TreePanel and then define the css class somewhere in your stylesheets e.g.:

.nct-tree-colalign-right { text-align: right !important; }

But don't forget to add the !important statement. If you forget it you won't see the definitons affecting the look of the TreePanel.

I now recognized the situation that you can only format a whole column. IMHO it's not possible to format each row as you like to. That's a pity because I wanted to differently format the different stages in the TreePanel. Are there any possibilities to although get it?