>The most confounding part of the grid is the delete column. I really want/need to use this feature, but it drives me crazy. What I want to do is fire code to recalculate invoice totals when a user clicks the delete column next to an item. However, the item is not "truly" deleted until after the code in the Grid delete method fires. The Deleted() function, if used in the method code, always returns the opposite value of what the record will be after the method code is executed. The recalculation does not reflect the correct total because the wanna-be deleted item is not yet deleted.
>
>Anyone care to shed some light on how you handle this? TIA.
Just a wild geese ... guess :). The event of grid.deleted() fires upon deletion, right? And the method you write there is supposed to handle it, therefore you may use it to prohibit deletion or do whatever you want when the bloody little square is clicked on, therefore I conclude it fires _before_ the record actually gets deleted. A simple thing I'd try (if I didn't have tons of my own things to try already) should be to
dodefault()
do_my_code_here
nodefault
in the grid.deleted() code. Its default behavior is to delete (or restore) the record, so just let it do it first.
Did I guess right?