[RESOLVED] Hierarchical controls?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: [RESOLVED] Hierarchical controls?

  1. #1
    Join Date
    Mar 2011
    Posts
    4

    [RESOLVED] Hierarchical controls?

    I'm looking to achieve the following. Display a database of quotations that can be categorised (sorted in a hierarchy) - 1 to 3 levels of collapsible/expandable categorisation. Such as:

    (I had to put in "----" characters to show the hierarchical layout as this forum trims spaces)


    -Wilde, Oscar
    -----London
    -----------"There's only one thing worse than being talked about, and thats..."
    -----------"She had one of those english faces that once seen was never remembered"
    -----New York
    -----------"I have nothing to declare except my genius"

    -Shaw, Bernard
    ------London
    -----------"The tragedy of man is that he is a genius tethered to a dying animal"


    The above shows 2 levels of categorisation by Author and City.

    I'd also like to display columns to the right to display additional attributes such as Date, Book, etc. Like in a spreadsheet style.

    The columns and categories should be able to be specified by the user at run time i.e. not a fixed layout. Ideally, I'd like the categories to be indented but would settle for having +/- controls to indicate an expandable/collapsible category.

    I've searched the forums for info on grid controls but am not sure if the above is possible. I would be delighted if this can be achieved with standard .NET controls but am prepared to invest in a commercial custom control if necessary.

    I'm reasonably experienced in Java but new to the C# and .NET world. Thanks in advance to the clever good-looking and charming people who respond and give me a shove in the right direction.

    Tom

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: Hierarchical controls?

    have you considered a Treeview?

  3. #3
    Join Date
    Mar 2011
    Posts
    4

    Re: Hierarchical controls?

    Thank you. I have found an article that combines the features of a treeview and a listview that seems to give me what I need.

    http://www.codeguru.com/csharp/cshar...eeListView.htm

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: Hierarchical controls?

    Good work sir. I have given you some points, why? Well, because you did a huge effort yourself, and you have searched through CodeGuru's articles.

    Well done

    Just remember to mark your thread resolved if you feel your issue has been solved.

    Hannes

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center