PC Review


Reply
Thread Tools Rate Thread

Dataview.ModifiedCurrent

 
 
=?Utf-8?B?Um9n?=
Guest
Posts: n/a
 
      28th Sep 2005
Hi

I'm having a problem with the above.

I get different behaviour depending on what triggers the method call. Let me
explain.

I have a gridview on a form, with a save button. Both the click event from
this button, and the event from clicking the top right close X (_Closing)
trigger the same code :

/* make a copy of the dataview so we can query the row state without
affecting the display on the screen*/

DataTable dt = ((DataView) dGridDiary.DataSource).Table.Copy();
DataView dv = dt.DefaultView;

dv.RowStateFilter = DataViewRowState.ModifiedCurrent;

if (dv.Count!=0)
//save changed rows ...

Now this always works if triggered by the save button, but it only seems to
work when triggered by the (_Closing) if the user has moved from the modified
row.

Has anybody else seen this behaviour? Is there a way around it, besides
always saving the activerow?

Thanks in advance

 
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
Sorted DataView, but unsorted datalist when bound to the dataview CodeMonkey Microsoft ASP .NET 1 4th Feb 2011 10:55 AM
to find the data from one dataview not in another dataview joe Microsoft ADO .NET 0 9th Jul 2008 10:39 AM
DataGrid and the DataView - ModifiedOriginal & ModifiedCurrent JHalet Microsoft Dot NET Framework Forms 0 28th Mar 2006 03:26 PM
Is there an easy way to copy a DataView (or even the DataGrid showing the DataView) to the Clipboard? Kevin Brown Microsoft Dot NET 4 5th Jan 2005 09:01 PM
"ModifiedCurrent" and "ModifiedOriginal" of the dataview Tom De Troch Microsoft VB .NET 0 26th Mar 2004 01:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:23 PM.