PC Review


Reply
Thread Tools Rate Thread

BindingSource.EndEdit and Position

 
 
=?iso-8859-1?Q?Samuel_Garc=EDa?=
Guest
Posts: n/a
 
      3rd Nov 2007
When I call BindingSource.EndEdit on one of the BindingSources of my
application, it correctly finishes the addition of the new row but
surprisingly it also resets its Position to zero (and so also changes the
object referenced by its Current property to the first item on the DataView
that underlies).

I would like to know if this is an expected behavior. It does not happen
with all my BindingSources.

I've handled the BindingSource.CurrentChanged event and I see something like
this in the call stack:

MyForm.bindingSource_CurrentChanged
[Native to managed]
[Managed to native]
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.OnCurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.CurrencyManager_CurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.OnCurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.ChangeRecordState
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.List_ListChanged
[Native to managed]
[Managed to native]
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.OnListChanged
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.InnerList_ListChanged
System.Data.dll!System.Data.DataView.OnListChanged
System.Data.dll!System.Data.DataView.IndexListChanged
System.Data.dll!System.Data.DataViewListener.IndexListChanged
System.Data.dll!System.Data.Index.OnListChanged
System.Data.dll!System.Data.Index.RecordChanged
System.Data.dll!System.Data.DataTable.RecordChanged
System.Data.dll!System.Data.DataTable.SilentlySetValue
System.Data.dll!System.Data.DataTable.EvaluateDependentExpressions
System.Data.dll!System.Data.DataTable.EvaluateExpressions
System.Data.dll!System.Data.DataTable.SetNewRecordWorker
System.Data.dll!System.Data.DataTable.InsertRow
System.Data.dll!System.Data.DataView.FinishAddNew
System.Data.dll!System.Data.DataRowView.EndEdit
System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.EndCurrentEdit
System.Windows.Forms.dll!System.Windows.Forms.BindingSource.EndEdit

Thank you very much 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
BindingSource.EndEdit() throws Exception Aaron Microsoft ADO .NET 2 20th Jun 2008 02:01 PM
BindingSource.EndEdit doesn't work with FormClosing Evan M. Microsoft Dot NET Framework Forms 2 17th Dec 2007 07:10 PM
BindingSource determine changes before calling EndEdit() Rob Dob Microsoft Dot NET Framework Forms 2 29th Mar 2007 05:16 AM
BindingSource determine changes before calling EndEdit() Rob Dob Microsoft C# .NET 2 29th Mar 2007 05:16 AM
BindingSource.EndEdit - Not updating underlying data source Dustin Davis Microsoft ADO .NET 12 5th Jan 2007 05:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:57 AM.