C# 1.1 DataGrid set to not deletable

J

Jason Huang

Hi,

In my C# 1.1 Windows Form, how do I limit a DataGrid's rows not to be
deleted, but still can be edit.
Thanks for help.

Jason
 
C

Claes Bergefall

Bind it to a DataView and set the DataView.AllowDelete property to false.
Something like this:

DataView view = new DataView(table);
view.AllowDelete = false;
grid.DataSource = view;

/claes
 

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