Try OpenEdge Now
skip to main content
GUI for .NET Programming
Binding ABL Data to .NET Controls : Managing data updates : Handling user interface events : Writing screen values to the data source object
 
Writing screen values to the data source object
The Assign( ) method provides a convenient way to assign the current screen values for a specified record in a bound UI control back to the corresponding record in the bound ABL data source object. This method delivers all the screen values as a unit. If the bound UI control is a primitive value, that is a variable or field, only that value is updated. However, if the bound UI control displays rows, the entire row's screen values are updated in the ABL data source object. The normal use for this method in multi-field control, like a grid, is with full rows. You cannot use this method to assign the changes for a single field in a multi-field control, because those values are not available until after any field- or cell-leaving events have fired.
If the assignment fails (for example, due to a validation error), Assign( ) returns FALSE. Otherwise, it returns TRUE. This method's results do not indicate whether or not the screen values changed. The results only indicate whether the assignment succeeded or failed.