You are correct, I was clicking the delete button on the grid. Yes, I
think checking the success or otherwise of the Ajax request sounds like
the right thing to do - since calls to the db can fail for all sorts of
reasons, not just constraints.
Regards
Mark
Anthony wrote:
In your case, were you doing the delete from an edit form or from the
grid
itself (via the delete button)? If the latter, what happens is that
the row
is immediately removed from the grid via Javascript, and then an Ajax
request is sent to delete the record from the db -- but if the Ajax
request
fails (which I assume happened in your case), I don't think any
feedback is
displayed to the page. Perhaps we should correct that -- first check the
response of the Ajax request, and only remove the row from the grid if it
was successful, otherwise flash an error message.