You can see this in the Order Entry sample. I'm using DF 19.0
Drop the following into the oOrderDtl_Qty_Ordered column in the Order.vw.
Code:
Procedure OnEndEdit String sOldValue String sNewValue
Number nPrice
Get SelectedRowValue of oInvt_Unit_Price to nPrice
Send None
End_Procedure
Put a breakpoint on "Send None", compile and run.
Find an order with multiple detail lines, click into the Quantity column on the first row and change the value. Now press the down arrow key on your keyboard.
The breakpoint is triggered - correctly - and the values are all as you'd expect. But when you continue to let the application run you'll see it gets called a second time, only this time the values are not correct. The returned price value is zero (and if you've code that relies on the value to do some other operation then this is annoying).
The problem seems to stem from Procedure NotifyCustomEndEdit in the cCJGrid.pkg file
Code:
Procedure NotifyCustomEndEdit Integer iCol String sValue
Handle hoDataSource
Integer iRow
Get phoDataSource to hoDataSource
Get SelectedRow of hoDataSource to iRow
Send NotifyEndEdit iRow iCol sValue
End_Procedure
In my case I've had to overwrite this in my subclass with
Code:
Procedure NotifyCustomEndEdit Integer iCol String sValue
Handle hoDataSource
Integer iRow
Get phoDataSource to hoDataSource
Get SelectedRow of hoDataSource to iRow
If (iRow<>-1) Begin
Send NotifyEndEdit iRow iCol sValue
End
End_Procedure
The issue being that as it gets triggered for the 2nd time, the selected row is -1 and so when it ultimately goes on to get the value you're asking for it returns nothing.