[Mono-bugs] [Bug 650830] New: DataView.ListChanged ItemDeleted has Old/NewIndex the wrong way around when item leaves filter
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Nov 2 17:15:59 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=650830
https://bugzilla.novell.com/show_bug.cgi?id=650830#c0
Summary: DataView.ListChanged ItemDeleted has Old/NewIndex the
wrong way around when item leaves filter
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: x86
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Data
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: cvolzke at live.com.au
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5
When a DataRow's values leave the scope of a DataView filter, a
ListChangedType.ItemDeleted is raised with the OldIndex containing the index
instead of NewIndex.
Usually when ItemDeleted is raised (in Mono and in ms.net), NewIndex should
have the old row's index.
Reproducible: Always
Steps to Reproduce:
Test case:
DataTable table = new DataTable();
table.Columns.Add("column");
table.Rows.Add("in");
table.Rows.Add("in");
ListChangedEventArgs listChanged = null;
table.DefaultView.ListChanged += (sender, e) => listChanged = e;
table.DefaultView.RowFilter = "column = in";
table.Rows[1][0] = "out";
Debug.Assert(listChanged.ListChangedType ==
ListChangedType.ItemDeleted);
Debug.Assert(listChanged.OldIndex == -1);
Debug.Assert(listChanged.NewIndex == 1);
Actual Results:
OldIndex == 1
NewIndex == -1
Expected Results:
OldIndex == -1
NewIndex == 1
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list