Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Stopping the 'Delete Record' popup
Sun, Jan 27 2008 5:26 AMPermanent Link

Pat
Hi all,

On my Master/Detail form I display the Details in a grid. If the grid
has the focus (and it is empty) and I press Ctrl-Del, I get the
standard application generated 'Delete Record?' popup. I want to stop
this popup IF the grid is empty. The table's BEFORE events do not stop
it because it looks like they are triggered AFTER the user hits OK in
the popup.

Do I use the grid's KeyDown or KeyPress in some way?

Regards,
Pat
Sun, Jan 27 2008 6:54 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Pat


What about dgConfirmDelete in the dbgrid.options property

Roy Lambert
Sun, Jan 27 2008 7:24 AMPermanent Link

Pat
Roy,

>What about dgConfirmDelete in the dbgrid.options property

it stops the 'Delete Record?' popup, but does not stop the 'MyTable:
Cannot perform this operation on an empty dataset' error showing.

Pat

Sun, Jan 27 2008 8:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Pat


Best idea I have then is to disable the grid when the dataset it empty. Or have you tried the OnDeleteError for the table?

Roy Lambert
Sun, Jan 27 2008 5:54 PMPermanent Link

Pat
Image