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 

Add a virtualrecord to a virtualrecordset

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support
View previous topic :: View next topic  
Author Message
dnarayan



Joined: 22 Oct 2007
Posts: 3

PostPosted: Mon Nov 05, 2007 2:49 am    Post subject: Add a virtualrecord to a virtualrecordset Reply with quote

Is there any way to add a virtualrecord to a virtualrecordset (without affecting the database in any way)? This is for viewing purposes only in a virtual tree. I want to be able to view an extra row with ancillary information for some queries.

Cheers,
Daniel
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Nov 05, 2007 11:54 pm    Post subject: Reply with quote

There isn't any way to add a VirtualRecord that can be browsed as part of a VirtualRecordset without actually adding it to the database.

If what you want is a summary type row in VirtualTree (eg to show averages or sums) then the best way to do this is probably to create your own composite list class that implements the IList interface, and return an instance of this composite list in the VirtualTree.GetChildren event/method.

The composite list class methods would mostly just call through to the corresponding VirtualRecordset method but the Count property would return the VirtualRecordset.Count + 1 and the Item method would check the index and if it is VirtualRecordset.Count would return your summary object.

The composite list would also need to implement the IBindingList interface, handling ListChanged events from the VirtualRecordset and passing these on - so that VirtualTree (and other controls) are still notified of changes to the VIrtualRecordset.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects 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