[Mono-bugs] [Bug 330415] New: Listview: index out of range exception removing the last item

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 3 10:09:35 EDT 2007


           Summary: Listview: index out of range exception removing the last
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: i586
        OS/Version: openSUSE 10.2
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: l.cavicchioli at nexida.com
         QAContact: mono-bugs at ximian.com
          Found By: Development


At runtime
- use a listview filled with some items
- select the last item in the list
- remove the item (i.e. press a button that execute a listView.Items.Remove of
the item selected)
- click (focus) on the list view 

This cause an exception:

Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
Parameter name: displayIndex
  at System.Windows.Forms.ListView+ListViewItemCollection.get_Item (Int32
displayIndex) [0x00000]
  at System.Windows.Forms.ListView.get_FocusedItem () [0x00000]
  at System.Windows.Forms.ListView.FocusChanged (System.Object o,
System.EventArgs args) [0x00000]
  at System.Windows.Forms.Control.OnGotFocus (System.EventArgs e) [0x00000]
  at System.Windows.Forms.Control.WmSetFocus (System.Windows.Forms.Message& m)
[0x00000] [.....]

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