By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,525 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

Disable Delete Row in Windows datagrid

P: n/a
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.
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joe,

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

Ken
-------------
"Joe Lalor" <jo*@jxlsoftware.com> wrote in message
news:0e****************************@phx.gbl...
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.

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.