I would like to be able to display the number of items in a folder, like in outlook, after the node text. So for example, in Outlook you have Inbox (3) and the "(3)" would be in a different color. Since my text is databound I can't change it. Is there a way to add another text item next to the Node Text and have it formatted differently? I have seen this in several examples but can't see how it is being done.
BTW - A few others have asked about this as well.
Thanks!
Hi,
There are a couple of ways you could do this.
One easy way would be to use images. You could write some simple code to create a bitmap that has the "(1)" in it and draw it with whatever font you like. Then you would use the RightImages collection on the node to add the image.
Another, more complicated, option would be to use the UltraFormattedTextEditor or the UltraFormattedLinkLabel as the EditorControl for your nodes. You would have to use a DataFilter in this case to add in the count and formating in the EditorToDisplay conversion and then strip it out again in the DisplayToEditor conversion.