Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bugs in AutoGenerate?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
EntityDev



Joined: 07 Apr 2016
Posts: 40

PostPosted: Sun Apr 10, 2016 9:33 pm    Post subject: Bugs in AutoGenerate? Reply with quote

One more, please, before I knock off for a Saturday...

I was having a devil of a time with the VirtualTree and its editor, until I realized that setting a datasource for the VirtualTree at design-time doesn't really seem to work, if one plans to add children objects.

When a datasource is set at design-time, of course an ObjectBinding is created. If I go then to the editor to add an ObjectBinding for a child property, a binding is added which appears to be a copy of the one already there. And, despite setting its TypeName property, the list of columns under the newly-added ObjectBinding remain unchanged, and unchangeable (as nearly as I can determine).

Anyway, this process sets the TypedListName property, as opposed to the TypeName property.

So, I went the route of leaving the VirtualTree.DataSource empty and proceeded to set it up manually.

Once again, using Add (ObjectBinding) doesn't work, for the same reasons detailed above.

I discovered that AutoGenerate seems to work - at first. When I used that, the TypeName property was set, but the tree refused to show any child records.

The generated TypeName property appears to be a fully qualified name, but it is not precisely the same as the syntax one finds in the TypeName ComboBox dropdown list.

Example:
AutoGenerated TypeName: DPMBranchModel.Job - This looks fully qualified to me.

However, until I used the dropdown and chose from the list...
DPMBranchModel.Job, DPMBranchModel

...I didn't get child rows.

That looks like a strange way to qualify a namespace.

I note that the bottom level "child" ObjectBinding doesn't care which syntax is used. It only become important when one wished the ObjectBinding to host child rows.

I may be going about this all wrong. It wouldn't be the first time. I believe that the Winforms paradigm invites, and developers expect, that design-time configuration of user controls should be intuitive and unambiguous. Even if the behavior I detailed above proves to be by design, the VirtualTree still holds great promise for me. I have as yet not found another which gets this close to fitting my needs. I've evaluated more of these things than I care to remember.

I confess to not having fully read the docs. I'll print the relevant sections and spend some time with them later.

Thanks very much.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5000

PostPosted: Sun Apr 10, 2016 11:27 pm    Post subject: Reply with quote

For Virtual Tree to be able to resolve types at design time it needs a fully qualified type name. This includes the assembly name ie MyNamespace.MyType, MyAssembly. Selecting the type from the dropdown list is the best way of ensuring that the type will be resolvable. If you specify a TypeName that VirtualTree can't resolve to a type then Virtual Tree will still use the binding at runtime by matching on the type name if possible.

Design time binding and auto-generation of columns and row bindings works reasonable well for DataSets as a means of getting you started quickly when you are dealing with large number of columns. You still will generally need to tweak the generated bindings and columns to get exactly what you want. I probably would not choose to use auto generation for anything other generating an initial set of bindings for DataSets.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
EntityDev



Joined: 07 Apr 2016
Posts: 40

PostPosted: Mon Apr 11, 2016 12:17 pm    Post subject: Reply with quote

Ok, thanks for the explanation regarding the assembly name.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group