I have a grid (yes, it's the same grid as the other problems I've been having lately. I don't know why I'm having so many with this one grid).
I've got 3 fields in the table, 2 of them are shown in the grid. Field A is a system total. Field B is the user total. Field C is the difference between A and B.
The theory is that Field A is filled by the system, then the user comes along and fills in Field B using the grid. Then I want to fill in Field C with A-B. I'm doing this in the keypress event of the grid.column.text control.
However, it doesn't work. With some corollary:
1. It does update the record, just puts 0 into Field C no matter what A-B actually is.
2. If I step through the keypress event, it works fine.
3. If I re-do the record (ie., enter something else in Field B), it works fine with *that* detail, but loses whatever I did first time around.
These are all very strange occurences. My boss though moving everything to beforerowupdate event might help, but I can't see what would cause all of the above.
I've got 3 fields in the table, 2 of them are shown in the grid. Field A is a system total. Field B is the user total. Field C is the difference between A and B.
The theory is that Field A is filled by the system, then the user comes along and fills in Field B using the grid. Then I want to fill in Field C with A-B. I'm doing this in the keypress event of the grid.column.text control.
However, it doesn't work. With some corollary:
1. It does update the record, just puts 0 into Field C no matter what A-B actually is.
2. If I step through the keypress event, it works fine.
3. If I re-do the record (ie., enter something else in Field B), it works fine with *that* detail, but loses whatever I did first time around.
These are all very strange occurences. My boss though moving everything to beforerowupdate event might help, but I can't see what would cause all of the above.