Prevent Ctrl-Delete of row in non-readonly DataGrid ?

  • Thread starter Thread starter Stephen Ahn
  • Start date Start date
S

Stephen Ahn

Using dotnet 1.1.

For a DataGrid where readonly = false, is there an easy way of preventing
the user from deleting rows by pressing Ctrl-Delete ?
I want the user to be able to edit existing rows, but not delete them.

TIA,
Stephen
 
Stephen,
Try,

DataView dataView = (DataView)((CurrencyManager)dataGrid1.BindingContext[
dataGrid1.DataSource, dataGrid1.DataMember ]).List;
dataView.AllowDelete = false;

Phil.
 
Back
Top