Results 1 to 5 of 5

Thread: Treeview control

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    417

    Treeview control

    Hey Guys,

    I have a treeview control on my form, i am trying to load an xml into the treeview to show cities/states (example at the bottom of the page)

    The xml that treeview is loading from looks like:

    vb.net Code:
    1. <?xml version="1.0" encoding="utf-8" ?>
    2. <Locations>
    3.   <Group name="US States">
    4.     <Group name="Alabama">
    5.       <Location name="Tuscaloosa" url="tsc/{0}" />
    6.       <Location name="Montgomery" url="mgm/{0}" />
    7.       <Location name="Mobile" url="mob/{0}" />
    8.       <Location name="Huntsville" url="hsv/{0}" />
    9.       <Location name="Gadsden-Anniston" url="anb/{0}" />
    10.       <Location name="{Florence|Muscle Shoals}" url="msl/{0}" />
    11.       <Location name="Dothan" url="dhn/{0}" />
    12.       <Location name="Birmingham" url="bhm/{0}" />
    13.       <Location name="Auburn" url="aub/{0}" />
    14.     </Group>
    15.     <Location name="Alaska" url="anc/{0}" />
    16.     <Group name="Arizona">
    17.       <Location name="Yuma" url="yum/{0}" />
    18.       <Location name="Tucson" url="tus/{0}" />
    19.       <Location name="Sierra Vista " url="fhu/{0}" />
    20.       <Location name="Prescott" url="prc/{0}" />
    21.       <Group name="Phoenix">
    22.         <Location name="{Central|South Phoenix|S. Phoenix}" url="phx/{0}/cph"/>
    23.         <Location name="East Valley" url="phx/{0}/evl"/>
    24.         <Location name="Phoenix North" url="phx/{0}/nph"/>
    25.         <Location name="West Valley" url="phx/{0}/wvl"/>
    26.       </Group>
    27.       <Location name="Mohave County" url="mhv/{0}" />
    28.       <Location name="{Flagstaff|Sedona}" url="flg/{0}" />
    29.     </Group>
    30. </locations>

    I'v never really used the treeview control before, i can load xml documents ok, i'm unsure how to then load the data into the treeview

    any help would be appreciated

    thanks guys

    Graham
    Attached Images Attached Images  

Posting Permissions

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



Click Here to Expand Forum to Full Width