Hey James,
Chris refers to how you can obtain DISPLAY value related to CURRENT DATA value in an item = <row, column>.
NOTE: In ItemChanged that code would obtain display value for OLD data value. Reason why ItemChanged has triggered is that the OLD value is most probably replaced by a NEW value - and your code probably wants to work on the NEW value. ==> So, it's complicated!
During ItemChanged new value hasn't reached the DW buffer yet, so any GetItemXxx stuff still refer to former value in current item = current <row, column>.
When some function (same for event) reads data from DW buffers it only works within ItemChanged if you do explicit SetItem before calling that function.
When you have AllowEdit = true you have to handle case where user entered DISPLAY value instead of DATA value. Typically, use dddw.Find to check for data value. If not found, do dddw.Find to check for display value on the display column. That is the order that DW engine's internal logic uses.
This kind of logic you probably want to write generic and encapsulate in ancestor class because it quickly becomes complex and repetitious. Remember display value's datatype may differ from data value's datatype -and- data parameter itself in ItemChanged is string whereas data column in buffer quite often is numeric!
I found the easiest way to resolve this is to POST whatever consequential action from ItemChanged to ensure data arrived safely in DW buffer before acting on it. Quite often that POST solves the issue. Other times, you have to handle all validation + conversions in-flight ==> complex data/display lookup + datatype conversions.
NOTE: PFC's logic for DDDW handling during ItemChanged has most of the code you probably need. So may the framework your app is already using. Even if your app uses different framework the PFC framework's DDDW handling may inspire you.
HTH /Michael
If you want to create a simple test case PB App and then attach it to this forum post ... I'll see if I can then "tweak" it for you to make the DDDW's work the way it does for me in my framework. ;-)
Regards ... Chris