假设你的DataGrid1.DataSource为DataTableDataGrid1.DataSource.defaultView.allownew=false
DataGrid1.DataSource.defaultView.allowdelete=false