Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi ,

I am working on an application, in which i have to show treeview in left side

Customers (Root node)
.....Customer1
	...Trip1
	    ...Situation
		Situation1
		Situation2
	    ...Visit
		Visit1
		Visit2
	    ...Activity
		Activity1
		Activity2	
	...Trip2
	    ...Situation
		Situation1
		Situation2
	    ...Visit
		Visit1
		Visit2
	    ...Activity
		Activity1
		Activity2
.....Customer2
	...Trip1
	    ...Situation
		Situation1
		Situation2
	    ...Visit
		Visit1
		Visit2
	    ...Activity
		Activity1
		Activity2	
	...Trip2
	    ...Situation
		Situation1
		Situation2
	    ...Visit
		Visit1
		Visit2
	    ...Activity
		Activity1
		Activity2

This treeview is not static..it is very dynamic in nature..and
any timer node at any level can be added, deleted, updated..
I have created a dataset with tables (Customer,Trip,Situation,Activity,Visit)
with relations among tables...
and bound that dataset to TreeView..
on selection of nodes, right side xaml for corresponding treenode should appear..

please help me..i have already spent so many days by searching on net..everywhere it has been explained by using observable collection way or some classic way..

please let me know in detail what is easiest and simplest way for doing this

1. Treeview ..dynamic nature
2. I want to save xaml of usercontrol or viewuser control (to display on right side) for each and every node in hastable..
Hashtable should have key (Treenode's id) and Value should have xaml of usercontrol or viewuser control (to display on right side)

Thanks a lot in advance..Waiting for reply
Posted
Updated 30-May-11 7:19am
v2
Comments
Sergey Alexandrovich Kryukov 30-May-11 12:17pm    
There is no question here.
1. Is not a question, TreeView is always dynamic in the sense you described, what to talk about?
2. You explain what you need. Why not just doing it? what did you try and what seems to be a problem?
--SA
shivanichhabra 31-May-11 7:57am    
- I want to know how can i create dataset with tables (Customer,Trip,Situation,Activity,Visit)
with relations among tables...what is the easiest way..please let me know i am very knew and not able to do this

1 solution

The treeView is dynamic in nature and using the observable collection is the best option,as the observable collection is updated from the VM then the tree is automatically updated.But the solution you are trying may be a bit performance degrading try updating the tree view using the observable collection.It'll be easier.As for your second clause i could not get the idea of what you wanted to do exactly if you could some more information may be we can work out some thing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900