Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

treeview and form

Status
Not open for further replies.

alecomo

Programmer
Joined
Oct 28, 2005
Messages
4
Location
IT
hi all...

i have a treeview formed by a root(MANIFEST) and a group of childs nodes(all at the same level) called ORGANIZATION

ORGANIZATION childs nodes are all inherited classes from the treenode classes...in my ORG class i made some new properties

if i right click on the child node a context menu appears with the possibilty to view the node properties->if i choose to see node properties a form appear where i can modify properties and save changes
(like when u click on a file u can see and modify some properties)

my problem is: when the form appears, its always the same with the same value for the fields and if i change a value in a filed this remains always the same for all the nodes...
instead i want that every node has its own form with its own value in the properties fields..
what can i do??

here is the code...please help me!!!


Organization org= new Organization() <--- this is the organization class inherited from TreeNode class
OrganizationForm orgform; <--- this is the organizationform class

private void OrgProperties_OnClick(System.Object sender, System.EventArgs e)

{

if (org.NodeForm == null) <-- nodeform is a property of the ORG class

{
orgform = new OrganizationForm(org);
org.NodeForm = orgform;
}
orgform = org.NodeForm;
orgform.Show(); <----- the program stops here when i try to open the form for the second time

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top