Kbase P134356: OffEnd event fires when accessing column value in UltraGrid while Batching property is set to TRUE
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/5/2009 |
|
Status: Unverified
SYMPTOM(s):
OffEnd event fires when accessing column value in UltraGrid while Batching property is set to TRUE
Accessing a column value in the initializeRow event handler causes the offEnd event to fire.
If the Batching property on a bindingSource is set to TRUE, an attempt to get a cell value as in the following example fires the OffEnd event:
METHOD PRIVATE VOID ultraGrid1_InitializeRow( INPUT sender AS System.Object, INPUT e AS Infragistics.Win.UltraWinGrid.InitializeRowEventArgs ):
IF e:ROW:Cells["country"]:Value:ToString() = "USA" THEN
e:ROW:Cells["country"]:Appearance:BackColor = System.Drawing.Color:Blue.
RETURN.
FACT(s) (Environment):
Windows
OpenEdge 10.2x
CAUSE:
If the Batching property is set to TRUE, the OffEnd event will fire when a bound control requests column values for the last row of the query. It will occur, for example, if the user is moving the scroll bar and encounters the last row, or if the user is at the last row and uses the keyboard to move down to the next row. The same behavior occurs in the binding source when the row is accessed programmatically. This is expected.
FIX:
To bypass unwanted processing of the OffEnd event when manipulating column values programmatically in initializeRow, set a flag to ignore the OffEnd event under those circumstances. When the last record has been retrieved, set the Batching property of the binding source to False to stop the OffEnd event from continuing to fire.