Disable Delete Row in Windows datagrid

  • Thread starter Thread starter Joe Lalor
  • Start date Start date
J

Joe Lalor

I want to disable row deletion in a Windows form
datagrid. I have tried using the row_changed/row_deleted
events for the datasource to reject changes for the row :
this prevents the row from being deleted from the table,
but it disappears from the grid.
 
Joe,

Create a dataview from dataset. Bind the datagrid to the dataview.
Set the dataview allowdelete property to false.

Ken
 

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

Similar Threads


Back
Top