Best way to validate a row

I have a TDBAdvGrid linked to a TClientDataSet with the grid EditPostMode = epRow and PageMode = True.  I seem to be having trouble understanding where I should validate the row allowing the post, applying updates and new row focus (if applicable ie. down arrow key vs navigator post button) to occur only on successful validation of row and keeping the focus on the offending line after displaying a dialog box stating the problem.  Validation has to occur on a row basis as the columns must add up to match a calculated value.

Thanks in advance,