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

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
 
G

Guest

Stephen,
Try,

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

Phil.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top