The ProBindingSource publishes the CancelCreateRow event when the user cancels adding a new record through a bound UI control. This event uses an OpenEdge built-in class, Progress.Data.CancelCreateRowEventArgs, that extends the .NET System.EventArgs class to pass the event arguments. The event argument class uses the BufferHdl and BufferName properties to pass the handle and name of the buffer for the appropriate table in the bound ProDataSet. If the bound ABL data source object is a query, rather than a ProDataSet, these properties contain the Unknown value (?).
An event handler for this event uses the following syntax:
Syntax
EventHandlerName (
INPUT sender AS CLASS System.Object,
INPUT args AS CLASS Progress.Data.CancelCreateRowEventArgs
).
Where EventHandlerName is the name of the event handler, sender is the object reference to the ProBindingSource, and args is the object reference to the CancelCreateRowEventArgs instance that contains the event arguments.
The event handler then needs to delete both the previously created row and the corresponding record in the result set. This keeps the data in the bound UI control synchronized with the ABL data source object.