View previous topic :: View next topic |
Author |
Message |
dweber
Joined: 06 Sep 2006 Posts: 6
|
Posted: Fri Sep 15, 2006 12:48 pm Post subject: |
|
|
Though I now see both topic and cardbox objects in my tree using the getChildren event, I am still unsure, if the way I setup Virtual Tree is really how it is meant to be. It would be nice if you could answer the following questions:
1.
I initialised the tree datasource with the root object of my topic class
I have other controls on my form that are linked to a topicbindingsource and cardbindingsource. Both bindingsources are collections of topic and cardbox objects. I want them be synchronized with the tree.
As virtualTree datasource needs a single Topic Object and the two bindingSources use collections of my objects I can see no 'automatic' way on databind tree and other controls to my data objects. So how can I synchronize them besides doing it manually?
2.
When setting up my two objects topic and cardbox in the tree editor I set ChildProperty and ParentProperty for my topic object and ParentProperty for my cardbox object. I saw that I can remove the ParentProperty of the topic object and I still get the tree correctly visualized. Why should I set both Child and Parent Properties?
3. Is there a complex sample on how to use drag and drop from and to virtual Tree? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Sep 20, 2006 3:27 am Post subject: |
|
|
Sorry I didn't see this post earlier - it was lost in some spam.
Quote: | As virtualTree datasource needs a single Topic Object and the two bindingSources use collections of my objects I can see no 'automatic' way on databind tree and other controls to my data objects. So how can I synchronize them besides doing it manually? |
Currently you'll have to synchronise manually by handling the SelectionChanged event. We are looking at implementing data source synchronisation - but due to the virtual loading mechanism of Virtual Tree it will have to be one way only (ie you select something in Virtual Tree and it sets the current element of the datasource(s)).
Quote: | When setting up my two objects topic and cardbox in the tree editor I set ChildProperty and ParentProperty for my topic object and ParentProperty for my cardbox object. I saw that I can remove the ParentProperty of the topic object and I still get the tree correctly visualized. Why should I set both Child and Parent Properties? |
You don't have to as long as you don't want to select or find items in the tree programmatically using the simple row location interface (see "Working with Rows" in the online help).
Quote: | Is there a complex sample on how to use drag and drop from and to virtual Tree? |
The DataSet Browser and Simple Tree samples both use the inbuilt mechanism to support drag and drop of items within the tree. We don't currently have a a sample which illustrates drag and drop to other controls although you can do this by handling the appropriate events. There are some other threads on the forums that discuss this (try searching for "drag"). _________________ Infralution Support |
|
Back to top |
|
|
|