[Mono-bugs] [Bug 486013] New: DataGridView: ArgumentOutOfRangeException in ClearSelection() after changing DataSource

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Mar 17 10:35:57 EDT 2009


           Summary: DataGridView: ArgumentOutOfRangeException in
                    ClearSelection() after changing DataSource
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: novell at asztal.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=280016)
 --> (https://bugzilla.novell.com/attachment.cgi?id=280016)
Test case

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en; rv:1.9.2a1pre)
Gecko/20090315 Minefield/3.2a1pre (.NET CLR 3.5.30729)

Setting the DataSource to a collection, selecting a row in the DataGridView,
re-binding a smaller collection to the DataSource such that the selected row
index is outside the range of the new collection, then calling
ClearSelection(), throws an ArgumentOutOfRangeException.

Reproducible: Always

Steps to Reproduce:
1. Save the attachment as Attachment.cs.
2. gmcs -r:System.Windows.Forms Attachment.cs && mono Attachment.exe
Actual Results:  
The 99th row is still selected, even though there are now only 50 rows in the
grid. The DGV throws an exception when trying to deselect it.

Expected Results:  
The selection is fixed up when the grid row count changes.

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