C# TreeView checkbox..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • piercy
    New Member
    • Aug 2007
    • 77

    C# TreeView checkbox..

    Woulod anyone be able to point me in the right direction with treeviews. Or perhaps tell me if a treeview is/or is not what im looking for in this case.


    Im pulling back some information from a database similar to:
    Im not quite sure how to display it from my mental to on screen so i hope this make sense.
    Code:
    [0] person 1
    ----[0] email addr
    --------------[0] notes for email addr
    ----[1] email addr
    --------------[0] notes for email addr
    [1] person 2
    etc.
    edit: my list of people and there email address is not limited. So one person may have 30 email addresses (in theory).

    Now, what im trying to do is have this information displayed in a treeview with a check box. laid out similar to those tiers but probably with notes on the same line as email addr. Then the user can select which email they would like to send to and as long as the notes have been filled in they should have a good idea on who its to.

    Will a tree view allow me to do this? Would someone be able to point me in the right direction on this. Ive done a few "small guides" but nothing really helped me achieve this. Also, if a treeview is not the way to do it please suggest another :)

    Thanks very much,
    Piercy
  • CyberSoftHari
    Recognized Expert Contributor
    • Sep 2007
    • 488

    #2
    Are you sure that you want to display only Name and E-mail ID?
    My suggestion is you can use two list views one is for Details of costumer and the other is to display list of E-mail Id for a particular costumer.

    1. Hide E-Mail listview.
    2. when the user clicks a costumer then fill and show the e-mail list view of that particular costumer.
    Note: Using list view is pretty complicated for this but it will be users friendly. (You can use treeview for only Name and E-mail ids).

    Comment

    • piercy
      New Member
      • Aug 2007
      • 77

      #3
      Originally posted by CyberSoftHari
      Are you sure that you want to display only Name and E-mail ID?
      My suggestion is you can use two list views one is for Details of costumer and the other is to display list of E-mail Id for a particular costumer.

      1. Hide E-Mail listview.
      2. when the user clicks a costumer then fill and show the e-mail list view of that particular costumer.
      Note: Using list view is pretty complicated for this but it will be users friendly. (You can use treeview for only Name and E-mail ids).
      its actually students :) but there are already listboxes allowing the selection of the student. this would be the final check for emailing. Unfortunatly because the information im pulling is already defined within another applications database im limited on what i can pull. Currently the only real reqs are email and the "notes". Im also going to try and add things like family status ie. is the email addr for a parent etc.

      ive finally got a treeview working.. all the guides i found didnt help. i managed to guess it myself.

      My next problem is... is there a way that when the parent node is checked / dechecked then check/ decheck all the child nodes?


      Wondered if there was soem sort of built in function im missing..?


      ive got as far as using the afterchecked event and tryign to foreach on the child nodes..


      Thanks again,
      Piercy

      Comment

      Working...