PC Review


Reply
Thread Tools Rate Thread

where to edit & EndEdit?

 
 
njp
Guest
Posts: n/a
 
      7th Feb 2005
BlankHi,
I have been unable to find info on the recommended way of editing and then
ending the edit for an application that uses databinding, including how a
field - currency manager - dataview - datatable ALL work together when
modified directly by a user or by code. I'm running into a problem with
various edits causing the application to get confused (me too) on what's
currently in an edit state and therefore on what to call the EndEdit. I've
seen conflicting advice to use/not use the CurrencyManager.EndCurrentEdit
method so I've been staying away from that.

Example: A form has fields bound to a DataSet.DataTable and to a DataView.
Of course the user can directly edit a field. Does this implicitly cause a
BeginEdit to occur? If yes on which object (i.e. the currencyManager,
dataview, or datatable)? Then elsewhere in the code, processing occurs and
the code modifies values. If BeginEdit isn't explicitly called, is it
automatically implicitly called when a value is changed in any of the
objects I've mentioned? As the application has grown I now see that values
are modified in different places - in a field, currencyManager, dataView or
dataTable. I'm assuming I need to pick one place to modify the values and
stick with it, but for which object is it best to do this? Should Begin/End
Edit be called within each sub that modifies data?

Also, how do you work with and what's the difference for a DataTable's
DataRowView that exists in a DataView and the current row of a
CurrencyManager?

Summary of possible EndEdits that I'm concerned with (where x is a row
number):

CurrencyManager.EndCurrentEdit
CType(CurrencyManager.Current, DataRowView).EndEdit
DataView(x).EndEdit
DataSet.DataTable(x).EndEdit

Appreciate any insight and understanding you may have to share...

Thanks,
NJ


 
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
endedit in formclosing Frank Microsoft C# .NET 0 28th May 2006 06:29 PM
Row - BeginEdit and EndEdit -> Why? Vayse Microsoft ADO .NET 5 8th May 2006 04:12 AM
EndEdit not working Gav Microsoft Dot NET 2 11th Jul 2005 02:28 PM
beginedit endedit Jason Huang Microsoft C# .NET 1 3rd Jun 2005 02:34 PM
DataTable.Row[i].EndEdit() Antonio Budano Microsoft ADO .NET 1 3rd Apr 2005 07:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:28 PM.