auutumn
February 11th, 2010, 11:04 AM
In my C# 2008 application, I have two treeview controls and Add, AddAll, Remove, and RemoveAll buttons. When the application starts, a populate() method is called which reads in the files in a specified directory and populate treeView1 which looks like this:
Billing
|---cBilling1
|---cBilling2
Home
|---cHome
Login
|---cLogin1
|---cLogin2
The user can copy/move a parent and all children or just a child between treeViews. The code is intelligent enough (almost) to know how to copy/move parents and children around so that the structure of both treeViews remains intact.
The issue I have is after I copy a child from treeView1 to treeView2 and then try to move that child back to treeView1, the child is put with the wrong parent. Below is the scenario.
Scenario #1:
1. Click on cBilling1 in treeView1.
2. Click the Add button
3. Click on cBilling1 in treeview2.
4. Click Remove.
-- cBilling1 is placed under the wrong parent.
The populate() method expects a folder the following folder structure and files in them (which can be empty).
C:\QA\Testscripts\Billing\cBilling1.py
C:\QA\Testscripts\Billing\cBilling2.py
C:\QA\Testscripts\Home\cHome.py
C:\QA\Testscripts\Login\cLogin.1py
C:\QA\Testscripts\Login\cLogin2.py
I appreciate any and all help!
Billing
|---cBilling1
|---cBilling2
Home
|---cHome
Login
|---cLogin1
|---cLogin2
The user can copy/move a parent and all children or just a child between treeViews. The code is intelligent enough (almost) to know how to copy/move parents and children around so that the structure of both treeViews remains intact.
The issue I have is after I copy a child from treeView1 to treeView2 and then try to move that child back to treeView1, the child is put with the wrong parent. Below is the scenario.
Scenario #1:
1. Click on cBilling1 in treeView1.
2. Click the Add button
3. Click on cBilling1 in treeview2.
4. Click Remove.
-- cBilling1 is placed under the wrong parent.
The populate() method expects a folder the following folder structure and files in them (which can be empty).
C:\QA\Testscripts\Billing\cBilling1.py
C:\QA\Testscripts\Billing\cBilling2.py
C:\QA\Testscripts\Home\cHome.py
C:\QA\Testscripts\Login\cLogin.1py
C:\QA\Testscripts\Login\cLogin2.py
I appreciate any and all help!