Kbase P128647: Infragistics - How to cancel a row update in UltraGrid
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/05/2011 |
|
Status: Verified
GOAL:
Infragistics - How to cancel a row update in UltraGrid
GOAL:
How to control cancel behavior in UltraWinGrid UltraGrid control
FACT(s) (Environment):
Windows 32 Intel
OpenEdge 10.2x
FIX:
The UltraGrid control supplies several events that a ABL program can subscribe to for various situations. Included is the BeforeRowUpdate event. This can be used to execute logic before the current row is updated. To subscribe to this event in the initializeComponent method, you should execute the following line of code:
lGrid:BeforeRowUpdate:Subscribe(BeforeRowUpdate).
<UltraGrid Object>:<Event>:Subscribe(<Local Method to be called when event fires>).
The Method signature for this event is:
METHOD PUBLIC VOID BeforeRowUpdate ( sender AS System.Object,
args AS CancelableRowEventArgs ):
When the event fires, the CancelableRowEventArgs object is passed as a parameter. This object provides the following two properties:
- Cancel - Assigned to TRUE applies the RowUpdateCancelAction <default CancelUpdate> to the grid row
- RowUpdateCancelAction - This can be assigned in the initializeComponent method. You can assign this to CancelUpdate, which reverts the row to old values or RetainDataAndActivation to leave the updated values for the user to correct.
To assign this property use something like the following:
lGrid:RowUpdateCancelAction = RowUpdateCancelAction:RetainDataAndActivation.
Row - UltraGridRow object of the row this event is being applied to.