>I agree that this approach is far better for your data. Just maintaining that key would slow you down enough to outweigh the benefits. To adapt the approach I was using there, you'd have to have an index on NoThread+cKeyField, where the cKeyField would have one or two characters per level. I think you've already had threads which went more than 255 levels deep, so my bet would be that you'd need two chars. OTOH, if you could get this to work with your data, you'd have the treeview drawn in a single pass, without recursion. You'd only have to build the key when saving a new message, but you could rely on the previous key being already built, so you wouldn't have to recurse at all, just bring all the previous replies to the same message to find out the last key used for that level, increase the last character by one, and that's it. You wouldn't have to recurse at all.
>
>The only question is the capacities of your data engine - can it sort by a field of the necessary length.
I believe those two approaches represent two interesting ways of accomplishing that layout. Thanks for having shared that info.