Toad World® Forums

Can I change the behavior of DEL when modifying a table?

This has now happened several times - I tried to delete the content of a cell with DEL, but it deletes the whole row instead and I cannot get it back without a ROLLBACK of my transaction.

Is there a way for me to change this Shortcut to say Ctrl+DEL so that I will never delete a row unintentionally?

CTRL+Del does delete the whole row, and I’ve been bitten by just “delete” deleting the whole row too. I don’t think there’s any options to control this, but I’ll take a look at it.

In the meantime, two suggestions:

Check Options -> Data Grids -> Data -> Confirm record deletions.

To clear the cell without using DEL at all: Click the cell you want to clear, click it again so you’re in edit mode and the whole cell text is selected, then backspace will clear it.

If you turn on the option “Confirm Record Deletions” (Options > Data Grids > Data > Behaviour) it makes it more difficult to accidentally delete a record and could be a good workaround for you. Clicking in a cell will highlight just the cell but clicking it again will highlight just the text in the cell and then DEL will work as you want it to.

I think the Ctrl+DEL option is a good suggestion too if it can be done.

Mark.

Ahh John, you beat me to it - must’ve been typing at the same time!

Thank you, John and markagardner!

I don’t delete like that very often (that’s also the reason I keep forgetting that DEL does not do what I expect it to do). Confirming every time I delete a row intentionally does not sound too tempting, so I think I’ll stick to my current workaround using ROLLBACK for the moment.

Would be great if I could change that option (or if the default would be changed, don’t know if anybody wants DEL to actually delete whole rows).

BTW: There is no need for the second click when using backspace, it also works after the first click (so you’re not in edit mode). I usually delete cells like that, but DEL is more intuitive for me, so that’s what happens when I don’t think about it.

Thanks again!

I agree it doesn’t make a much sense that Del should delete the whole row when it also can clear a cell, especially if you can also delete a row with CTRL+Del. Changed for next beta.