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 

Newbie question about SetControlValue event

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



Joined: 11 May 2011
Posts: 7

PostPosted: Wed May 11, 2011 12:31 pm    Post subject: Newbie question about SetControlValue event Reply with quote

Why does the SetControlValue event is fired only on creation of the editing control? What is the difference between it and Initialize event?
Does it makes any sense to handle two events?

PS. I'm using Infralution Virtual Tree ver.4
Back to top
View user's profile Send private message AIM Address
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed May 11, 2011 11:06 pm    Post subject: Reply with quote

The Initialize event is fired each time an editor control is created or assigned to another cell (since editor controls are reused where possible). It provides you with an opportunity to initialize properties and event handlers for the control. The e.NewControl flag allows you to determine whether the event is being called to initialize a new control or to reassign an existing control to a new cell.

The SetControlValue event is fired when Virtual Tree wants to assign a value into the editor control - it allows custom handling of this. In general you probably will see an Initialize followed by a SetControlValue. The only time where this won't be true is if you have an open editor control (particularly if the DisplayMode is Always) and the data is updated. In this case you will get a SetControlValue event for the already initialized controls without an Initialize event.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
mike_girkin



Joined: 11 May 2011
Posts: 7

PostPosted: Thu May 26, 2011 9:00 am    Post subject: Reply with quote

Thank you very much! Your reply has helped a lot!
Back to top
View user's profile Send private message AIM Address
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