DataGrid : cancel DataRowChangeEvent ? 
Author Message
 DataGrid : cancel DataRowChangeEvent ?

Say you want to validate a modification by the user, and say you want to
cancel the user action.
For instance, you do not want a particular DataRow to be deleted;

You handle the event in DataTable.RowChanging, where the DataRowChangeEvent
tells you which action the user is doing, like 'delete', and which  row the
action was on.

But how can you cancel the action ?

The action argument is read-only;
if you apply rejectChanges to the DataRowChangeEvent.row, the DataRow is
still marked as deleted afterwards;
and there is no Cancel argument.



Mon, 01 Nov 2004 01:49:03 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Cancel button to cancel loop?

2. any way to make the scroll in one datagrid bind to the scroll in another datagrid

3. changing row colors in DataGrid (not a web DataGrid)

4. subclass DataGrid or add to DataGrid to UserControl

5. datagrid: how to get a class to display in a datagrid

6. How to disable adding, inserting ord deleting Rows in the DataGrid (System.Windows.Forms.DataGrid)

7. Cancel The "Cancel" in Dialog based !!!???

8. Canceling an event

9. ListBox How to Cancel the OnSelectedIndexChanged??

10. print cancel

11. Canceling TabControl Navigation

12. Minor IDE BUG - ESC should be cancel

 

 
Powered by phpBB® Forum Software