PC Review


Reply
Thread Tools Rate Thread

Deleting row from DataView

 
 
Derrick
Guest
Posts: n/a
 
      9th Nov 2005
Hello;

Dealing with Winforms on 1.1 framework, VS.NET 2003.

I have a DataView (which is the datasource for a datagrid), and I want to be
able to delete rows only if specific columns contain specific values. For
instance, one of the columns contains boolean values; if the value for the
row in question is true go ahead and delete it, but if it's false cancel the
delete.

I have a handler hooked to the DataTable.RowDeleting event (the DataTable is
obviously the source for my DataView), which supposedly fires before the row
is deleted. In there, I check my column conditions, but what I need to know
is what do I call to cancel the deletion? I've tried DataRow.RejectChanges,
DataRow.CancelEdit, and DataTable.RejectChanges to no avail - the row always
disappears from the datagrid, so I assume the row is being deleted from the
view. I step through the event, so it is being triggered and my condition
checking is accurate.

Thanks for your help;

Derrick


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting from a DataView Mike Mattix Microsoft ADO .NET 5 16th Nov 2008 11:09 AM
Deleting row from DataView (OT) Derrick Microsoft C# .NET 1 9th Nov 2005 09:08 PM
Q: Deleting rows in a DataView Geoff Microsoft VB .NET 4 22nd Oct 2005 09:43 AM
Re: Deleting from a dataview Miha Markic [MVP C#] Microsoft ADO .NET 0 13th Apr 2005 08:51 PM
Re: Deleting from a dataview Miha Markic [MVP C#] Microsoft ADO .NET 0 13th Apr 2005 05:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:26 PM.