HighTechTalks DotNet Forums  

BindingSource.EndEdit and Position

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss BindingSource.EndEdit and Position in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Samuel García
 
Posts: n/a

Default BindingSource.EndEdit and Position - 11-03-2007 , 04:11 PM






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.Bind ingSource.OnCurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.Bind ingSource.CurrencyManager_CurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.Curr encyManager.OnCurrentChanged
System.Windows.Forms.dll!System.Windows.Forms.Curr encyManager.ChangeRecordState
System.Windows.Forms.dll!System.Windows.Forms.Curr encyManager.List_ListChanged
[Native to managed]
[Managed to native]
System.Windows.Forms.dll!System.Windows.Forms.Bind ingSource.OnListChanged
System.Windows.Forms.dll!System.Windows.Forms.Bind ingSource.InnerList_ListChanged
System.Data.dll!System.Data.DataView.OnListChanged
System.Data.dll!System.Data.DataView.IndexListChan ged
System.Data.dll!System.Data.DataViewListener.Index ListChanged
System.Data.dll!System.Data.Index.OnListChanged
System.Data.dll!System.Data.Index.RecordChanged
System.Data.dll!System.Data.DataTable.RecordChange d
System.Data.dll!System.Data.DataTable.SilentlySetV alue
System.Data.dll!System.Data.DataTable.EvaluateDepe ndentExpressions
System.Data.dll!System.Data.DataTable.EvaluateExpr essions
System.Data.dll!System.Data.DataTable.SetNewRecord Worker
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.Curr encyManager.EndCurrentEdit
System.Windows.Forms.dll!System.Windows.Forms.Bind ingSource.EndEdit

Thank you very much in advance


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.