A change has been made in the timing of when a DataWindowControl is fully created that affects all builds after DataWindow .NET 1.5 GA. This change might require modifications to your code if
You create a DataWindowControl dynamically, or
You create a DataWindowControl using drag-and-drop and call the SetTransaction or Retrieve methods from the Constructor event.
DataWindow .NET can fully create simple controls, such as Button and Label controls, in a form’s Constructor event. The DataWindowControl has more complex properties. Previously, DataWindow .NET created the control each time the user modified a property, and this resulted in slower performance. DataWindow .NET 1.5 now requires the user to complete most modifications to the properties before the control is created.
If you create the DataWindowControl dynamically, you create a new instance using the New operator and assign values to the control’s properties. You must then call the CreateControl method explicitly to fully create the control before you call the SetTransaction or Retrieve methods.
If you create the DataWindowControl by dragging it from the Toolbox to a form, the control is not fully created until the Load event for the form is fired. The DataWindowControl’s CreateControl method is called in the background when the Load event fires. This means that you can call SetTransaction or Retrieve from the Load event, but you cannot call them from the Constructor event unless you explicitly call the CreateControl method first.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |