I'm currently implementing a database querying tool, and am currently working on a section which would allow users to specify ORDER BY and Aggregate clauses. My biggest challenge has been to represent it in a neat format, while allowing users to add as many attributes as they like. What I've done so far is presented the results as a Tree, where users can add levels to the tree, representing new attributes.

Pressing the 'Add Attributes' button adds a new level in the tree. I'm not 100% satisfied with this approach, however I also tried a grid approach but preferred this due to the fact that users can keep adding as many attributes as they like.

Does it appear user-friendly, neat and visually pleasing? If not, what could be improved? Is there some other representation I could use?

  • 1
    I would suggest that you force the width of the leftmost dropdown to a common size, so that everything lines up neatly.
    – Ben Voigt
    Commented Feb 22, 2013 at 23:15
  • I don't know your users, but in terms of complex DB querying, there's still a place for the command line interface. I do feel we often design GUIs to handle complex issues that, depending on the users, at times would be better handled via the command line.
    – DA01
    Commented Feb 23, 2013 at 0:50

1 Answer 1


Congratulations, you've invented TreeTable. Don't get me wrong, no sarcasm at all. The direction is right, but current implementation should be changed. TreeTable example:

enter image description here

BTW, your task is not new, so there are a lot of other real-life examples:

enter image description here

enter image description here

enter image description here

enter image description here

My biggest concern is flexibility. Naturally, there is no problem if you do not need to support some other constructions except "Attribute|Order|Function". If you do need -- free form editor can be build using something like this:

enter image description here

I do not suggest to go that way, just want you to know there is another way, which provides:

  • flexibility
  • visual hints
  • simplified validation
  • user-friendliness
  • etc

TreeTable is the best solution because you already have it implicitly.

  • Nice detailed answer. Kudos!
    – daydalis
    Commented Feb 23, 2013 at 4:38
  • Thanks for the detailed answer. Is TreeTable available in WPF? I'm using TreeView to implement the above.
    – Dot NET
    Commented Feb 23, 2013 at 9:04
  • 1
    You are welcome. Sorry, I have very little experience with WPF, please check the following example - codeproject.com/Articles/30721/WPF-TreeListView-Control Commented Feb 23, 2013 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.