View previous topic :: View next topic |
Author |
Message |
mike_girkin
Joined: 11 May 2011 Posts: 7
|
Posted: Wed May 11, 2011 12:31 pm Post subject: Newbie question about SetControlValue event |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed May 11, 2011 11:06 pm Post subject: |
|
|
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 |
|
|
mike_girkin
Joined: 11 May 2011 Posts: 7
|
Posted: Thu May 26, 2011 9:00 am Post subject: |
|
|
Thank you very much! Your reply has helped a lot! |
|
Back to top |
|
|
|