[Mono-bugs] [Bug 79415][Nor] New - [PATCH] ListView: Ordering of SelectedItems and CheckedItems does not match Items

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Sep 16 10:06:35 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=79415

--- shadow/79415	2006-09-16 10:06:35.000000000 -0400
+++ shadow/79415.tmp.31722	2006-09-16 10:06:35.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 79415
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] ListView: Ordering of SelectedItems and CheckedItems does not match Items
+
+The order of items in the SelectedItems and CheckedItems collection (of 
+ListView) does not match their index in the Items collections.
+
+For example:
+
+- you have three items in your listview 
+- you select all three of them
+- you deselect the second item
+- you select it again
+
+Expected result:
+
+On MS.NET, the second item will also be returned as the second item in 
+the SelectedItems collection.
+
+Actual result:
+
+On Mono, the second item will be returned as the third item in the 
+SelectedItems collection.
+
+====
+
+Also, sorting the Items collection should affect the order of the items 
+in the SelectedItems and CheckedItems collection. It did not on Mono.
+
+The attached patch fixes this by rebuilding inner list of the 
+CheckedItems and SelectedItems on demand.
+
+I've also added two new unit tests for this issue.
+
+Let me know if it's ok to commit.


More information about the mono-bugs mailing list