Infragistics UltraWinGrid Delete Confirmation

Jeff picture Jeff · Jul 29, 2009 · Viewed 8.3k times · Source

By default the ultraWinGrid pops up a delete confirmation box for any row deletions. How do I turn that feature off?

If I'm deleting in the code, it's no problem:

myUltraGrid.DeleteSelectedRows(False)

But I don't know how to apply that when the user presses the delete key.

Answer

auujay picture auujay · Jul 29, 2009

You can detect when they press the delete key on your row. Use something like the BeforeRowsDeleted event. That event exposes the BeforeRowsDeletedEventArgs object which has the e.DisplayPromptMsg property available to you.

private void ultraGrid_BeforeRowsDeleted(object sender, BeforeRowsDeletedEventArgs e)
{
     e.DisplayPromptMsg = false;
}