Results 1 to 3 of 3

Thread: Checking Treeview from Datatable

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Checking Treeview from Datatable

    I am creating a wizard like application that lets users select Provider/SubProvider combinations. I am populating a treeview from a datatable (called dtAllProviders). The treeview lets the user check all providers and subproviders. When the user clicks next I store all the selected values into a datatable(called dtSelectedProviders). When the User clicks back, I want to populate the treeview with dtAllProviders, then go through and check all the nodes for their corresponding record in dtSelectedProviders. I am really stuck on how to go through checking all the nodes. Any ideas or sample code is appreciated. Thanks.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Checking Treeview from Datatable

    Wouldn't it be better to use a single DataTable and add an extra Boolean column that indicates whether it's selected or not? Also, if you don't destroy your TreeView then there's no need to repopulate if the user presses the Back button.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    58

    Re: Checking Treeview from Datatable

    That is a good idea just adding an extra column to the datatable. Thanks for the help

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