[Mono-bugs] [Bug 483202] New: DataGridView: Scrolling down with PageDown a DataGridView and then setting RowCount to 0 throws exception.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Mar 7 14:57:31 EST 2009


           Summary: DataGridView: Scrolling down with PageDown a
                    DataGridView and then setting RowCount to 0 throws
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=277864)
 --> (https://bugzilla.novell.com/attachment.cgi?id=277864)
Unit test the demostrates the problem shown in bug report.

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6

This seems dependent on size of grid and how many rows there are.

Attached unit test which reproduces the problem.

Here is exception from my Test Program:

Unhandled Exception: System.ArgumentOutOfRangeException: Index is less than 0
or more than or equal to the list count.
Parameter name: index
  at System.Collections.ArrayList.ThrowNewArgumentOutOfRangeException
(System.String name, System.Object actual, System.String message) [0x00000] 
  at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] 
  at System.Windows.Forms.DataGridViewRowCollection.SharedRow (Int32 rowIndex)
  at System.Windows.Forms.DataGridView.GetRowInternal (Int32 rowIndex)
  at System.Windows.Forms.DataGridView.MoveCurrentCell (Int32 x, Int32 y,
Boolean select, Boolean isControl, Boolean isShift, Boolean scroll) [0x00000] 
  at System.Windows.Forms.DataGridView.OnRowsRemovedInternal
(System.Windows.Forms.DataGridViewRowsRemovedEventArgs e) [0x00000] 
  at (wrapper remoting-invoke-with-check)
  at System.Windows.Forms.DataGridViewRowCollection.Remove
(System.Windows.Forms.DataGridViewRow dataGridViewRow) [0x00000] 
  at System.Windows.Forms.DataGridViewRowCollection.RemoveAt (Int32 index)
  at System.Windows.Forms.DataGridView.set_RowCount (Int32 value) [0x00000] 
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.DataGridView:set_RowCount (int)
  at Form1.Main () [0x00000] 

Reproducible: Always

Steps to Reproduce:

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