Bug 15051 - DataGridView.Rows.RemoveAt() returns exception when trying to remove row 0 more than once
Summary: DataGridView.Rows.RemoveAt() returns exception when trying to remove row 0 mo...
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 3.2.x
Hardware: PC Linux
: Lowest normal
Target Milestone: Community
Assignee: Bugzilla
Depends on:
Reported: 2013-09-27 16:55 UTC by Ron Werbow
Modified: 2017-12-20 19:06 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ron Werbow 2013-09-27 16:55:52 UTC
I have a DataGridView that displays information about a running script.  I only keep the most recent 100 rows, removing row zero repeatedly.  Under .Net, this is fine.  Under Mono, the first time I remove row zero, it works.  The second time and thereafter, an exception is thrown, stating that the index is out of bounds.

A second issue.  Without removing any rows, I just put a few rows into the DataGridView, such that there are more rows than can be displayed.  To see the bottom row, the vertical scrollbar thumb has to be moved to the bottom.  Then I issue a Rows.Clear() command and the entire program shuts down and is no longer in memory.  If I don't touch the scrollbar and leave it at the top, the DataGridView clears as expected.
Comment 1 Miguel de Icaza [MSFT] 2014-02-12 17:27:01 UTC
Setting priority to lowest, since Windows.Forms is no longer being developed actively.
Comment 3 Alexander Köplinger [MSFT] 2017-12-20 19:06:09 UTC
Fixed by the above commit.