C# 1.1 DataGrid set to not deletable

  • Thread starter Thread starter Jason Huang
  • Start date Start date
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
 
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
 
Back
Top