Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BindingSource.Position question

17 views
Skip to first unread message

Mark Atkinson

unread,
Oct 31, 2007, 12:33:01 PM10/31/07
to
I have a BindingSource object bound to some UI on a WinForm and the
BindingSource's DataSource value is a DataView.
Sometimes when I change the value of the Position property of the
BindingSource object the underlying record in the DataView gets set to a
Modified state even though no data has changed. Is there any reason why this
might be happening or how it can be prevented?
A (cut and pasted) stack trace is below and you can see how when the
Position is set, that the ListChangedEvent on the DataView eventually gets
called and in that event handler, the row is now Modified (but no data
actually changed).

OnListChanged(object sender = {DataView},
System.ComponentModel.ListChangedEventArgs e =
{System.ComponentModel.ListChangedEventArgs}) Line 616 + 0x12 bytes
[Native to Managed Transition]
[Managed to Native Transition]

System.Data.dll!System.Data.DataView.OnListChanged(System.ComponentModel.ListChangedEventArgs
e = {System.ComponentModel.ListChangedEventArgs}) + 0xf1 bytes
System.Data.dll!System.Data.DataView.IndexListChanged(object sender,
System.ComponentModel.ListChangedEventArgs e =
{System.ComponentModel.ListChangedEventArgs}) + 0x21 bytes
System.Data.dll!System.Data.DataViewListener.IndexListChanged(object
sender, System.ComponentModel.ListChangedEventArgs e) + 0x41 bytes

System.Data.dll!System.Data.Index.OnListChanged(System.ComponentModel.ListChangedType changedType, int newIndex, int oldIndex) + 0x66 bytes
System.Data.dll!System.Data.Index.RecordStateChanged(int oldRecord,
System.Data.DataViewRowState oldOldState, System.Data.DataViewRowState
oldNewState, int newRecord, System.Data.DataViewRowState newOldState,
System.Data.DataViewRowState newNewState) + 0xfb bytes
System.Data.dll!System.Data.DataTable.RecordStateChanged(int record1 = 2,
System.Data.DataViewRowState oldState1 = Unchanged,
System.Data.DataViewRowState newState1 = ModifiedOriginal, int record2 = 3,
System.Data.DataViewRowState oldState2 = None, System.Data.DataViewRowState
newState2 = ModifiedCurrent) + 0x7f bytes

System.Data.dll!System.Data.DataTable.SetNewRecordWorker(System.Data.DataRow
row = {System.Data.DataRow}, int proposedRecord, System.Data.DataRowAction
action = Change, bool isInMerge, int position, bool fireEvent = true, out
System.Exception deferredException = null) + 0x295 bytes
System.Data.dll!System.Data.DataTable.SetNewRecord(System.Data.DataRow
row, int proposedRecord, System.Data.DataRowAction action, bool isInMerge,
bool fireEvent) + 0x3d bytes
System.Data.dll!System.Data.DataRow.EndEdit() + 0x48 bytes
System.Data.dll!System.Data.DataRowView.EndEdit() + 0x33 bytes

System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.EndCurrentEdit() + 0x77 bytes

System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.ChangeRecordState(int
newPosition = 1, bool validating = true, bool endCurrentEdit, bool
firePositionChange = true, bool pullData = false) + 0xa0 bytes

System.Windows.Forms.dll!System.Windows.Forms.CurrencyManager.Position.set(int value) + 0x3e bytes

System.Windows.Forms.dll!System.Windows.Forms.BindingSource.Position.set(int
value) + 0x1c bytes

jfrange...@gmail.com

unread,
Mar 10, 2016, 11:49:36 AM3/10/16
to
Hi!!!

I have the same problem!!

Can you help me?
0 new messages