Try OpenEdge Now
skip to main content
GUI for .NET Programming
Binding ABL Data to .NET Controls : Managing data updates : Enabling and disabling updates

Enabling and disabling updates

Even if a particular .NET UI control supports adding, deleting, or editing records, your application cannot perform those updates unless the ProBindingSource is enabled for that type of update. The AllowXxx and ChildAllowXxx properties on the ProBindingSource control what types of updates are allowed. All these properties are set to TRUE by default. If you want to disable a certain type of record update, you can set the appropriate property to FALSE.
Note: A particular bound UI control might not support a particular ProBindingSource property. By the standard .NET protocol, the bound UI control reads the properties that it supports and adjusts its behavior to match.
For example, suppose you have a hierarchical grid for Customer records and Order records. The user should be able to delete orders, but not customers. You can achieve the desired result through the ProBindingSource, rather than through the grid itself. The following code disables deleting parent records and enables deleting child records:
pbs:AllowRemove = FALSE.
pbs:ChildAllowRemove["ttOrders"] = TRUE.